Question posted 2009 · +6 upvotes
Given
Select Case cmd
case "ONE": MsgBox "one"
case "TWO": MsgBox "two"
case "THREE": MsgBox "three"
End select
My requirement is if cmd = "ONE" I need "one" and then "two" displayed however currently I am getting "one" displayed and then the program is breaking out of the select case…
Accepted answer +12 upvotes
Select Case cmd
case "ONE", "TWO":
if cmd = "ONE" THEN
MsgBox "one"
end if
MsgBox "two"
case "THREE": MsgBox "three"
End select
Top excel-vba Q&A (6)
- How to clear the entire array? +58 (2010)
- How to change Format of a Cell to Text using VBA +55 (2011)
- Download attachment from Outlook and Open in Excel +43 (2012)
- Can a VBA function in Excel return a range? +36 (2009)
- 2 Dimensional array from range +34 (2013)
- Hiding an Excel worksheet with VBA +33 (2009)
excel-vba solutions on this site
.