![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Hi-
Im using a mesage box on userform1 that pops up when the user presses the commandbutton. The mesage box asks a question, then gives a choice of yes or no. If yes is selected I want userform1.hide and userform2.show. if no is selected I want userform1.hide and userform3.show. How do you write this in code in the userform1 commandbutton click()? |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Ans = msgbox("your Q",Vbyesno) if Ans = vbyes then userform1.hide userform2.show else userform1.hide userform3.show endif Ivan |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Posts: 117
|
Thanks Ivan- this works great
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|