Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick VBA code question (if...then statement)
How would i write in VB code:
if checkbox1, checkbox2, and checkbox3 all equal false then Unload me else finish going thru the rest of the code. I just don't know how to 'ask' "if [multiple things] then" in VB thank -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick VBA code question (if...then statement)
If checkbox1.value = false and checkbox2.value = false and
checkbox3.value = false then unload me End If If all the criteria isn't met, the "unload me" will be skipped and the code following the "end If" will execute. -----Original Message----- How would i write in VB code: if checkbox1, checkbox2, and checkbox3 all equal false then Unload me, else finish going thru the rest of the code. I just don't know how to 'ask' "if [multiple things] then" in VB thanks --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick VBA code question (if...then statement)
abxy
try something like this with userform1 if .checkbox1 and .checkbox2 and .checkbox3 = False then unload me exit sub ''this stops the macro end if end with HTH Charle -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick VBA code question (if...then statement)
I would use
If Not Checkbox1.Value Then If Not Checkbox2.Value Then If Not Checkbox3.Value Then Unload Me End If End If End If This way, if 1 or 2 is set, the remaining tests are not executed. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "abxy " wrote in message ... How would i write in VB code: if checkbox1, checkbox2, and checkbox3 all equal false then Unload me, else finish going thru the rest of the code. I just don't know how to 'ask' "if [multiple things] then" in VB thanks --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick VBA code question (if...then statement)
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Quick Question | Excel Discussion (Misc queries) | |||
Quick Question | Excel Discussion (Misc queries) | |||
quick question | Excel Discussion (Misc queries) | |||
Quick Code | Excel Discussion (Misc queries) | |||
Is there a quick way to see which objects have code attached? | Excel Programming |