What is the VBA equivilate to Excel worksheet function MAX?

  • Thread starter Thread starter Phillips
  • Start date Start date
P

Phillips

I am trying to do the same thing as =MAX(I2,M2,Q2) would do.
How can I do this? Can I add more values to compare?

Thanks,
Phil
 
Hi Phil

Sub test()
Dim L As Long
L = 600
MsgBox Application.Max(3.1415, L, 903.33, -4, 2)
End Sub
 
Back
Top