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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top