Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can I put a message box into an IF statement in VBA???
|
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
If [A1]1 then MsgBox "Hi" End if -- Cheers, Shane Devenshire "Elise148" wrote: Can I put a message box into an IF statement in VBA??? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You might try something like the following:
Dim Resp As VbMsgBoxResult Resp = MsgBox(prompt:="Do you want to do something?", Buttons:=vbYesNo) If Resp = vbYes Then ' code if user clicked 'Yes' Else ' code if user clicked 'No' End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting www.cpearson.com (email on the web site) "Elise148" wrote in message ... Can I put a message box into an IF statement in VBA??? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can an If statement answer an If statement? | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions | |||
IF Statement | Excel Discussion (Misc queries) | |||
If statement and Isblank statement | Excel Worksheet Functions | |||
Help please, IF statement/SUMIF statement | Excel Worksheet Functions |