Thread: AND/OR in Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default AND/OR in Macro

Take a look at the "And Operator" topic in VBA Help...

If OptionButton1.Value And OptionButton2.Value Then

....


In article ,
WLMPilot wrote:

Do I follow the same format in a macro as I do in a spreadsheet for the
following?

IF(AND(test1, test2))

If not, what would be the correct way to test the value of multiple fields.

I wanted to test the value of optionbutton1 and optionbutton 2 and if either
were TRUE, THEN...........

Thanks,
Les