Thread: AND/OR in Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dan R. Dan R. is offline
external usenet poster
 
Posts: 220
Default AND/OR in Macro

If Me.OptionButton1 Or Me.OptionButton2 Then
MsgBox "both checked"
Else
MsgBox "none checked"
End If

--
Dan

On Jan 9, 8:51*am, 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