Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
TIA
I'm familiar with writing an IF THEN OR or AND statement in a formula, but i don't know how to write an OR statement in a macro. I've created a spreadsheet where the user can use one of two different text boxes to input data. Box A can be compared with a variable (some of you have helped me with that already). I need the macro to determine if data in either box is matches either of two variables, then an even takes place. so, a mathamatical problem is given. users have the choice of answering the problem in either of two ways. i need an a statement that is something like: if a is true or b is true then ....... but, i don't know how to do it with a macro. If CInt(checks.Text) = x1 Then ........... (this works great) i need something like If CInt(checks.Text) = x1 Or CInt(cash.Text) = x2 then .......... but i don't know how write it and can't find it in my help books. my help book mentions OR statements but has no examples or real data. thanks again everyone for your help. jasonK. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If Statement to run a macro | Excel Discussion (Misc queries) | |||
If statement in macro | Excel Discussion (Misc queries) | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
IF statement macro | Excel Programming | |||
Macro statement | Excel Programming |