![]() |
![]() |
|
|||||||
| 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 |
|
New Member
Join Date: Apr 2002
Posts: 26
|
All I get when I click on the CommandButton are the Message Boxes. What's wrong with my code? Can anyone help?
Mareene Private Sub CommandButton3_Click() MsgBox "Do You Have T. P Vehicle Info To Add?", vbYesNo If Response = vbYes Then MultiPage1.Value = 1 Name1.SetFocus Else MsgBox "Do You Have T. P. Injury & Cargo Info To Add? ", vbYesNo If Response = vbYes Then MultiPage2.Value = 2 Nametp1.SetFocus Else CommandButton1_Click End If End If End Sub |
|
|
|
|
|
#2 |
|
New Member
Join Date: Apr 2002
Posts: 26
|
Never mind, I figured it out.
Mareene |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 26
|
On second thought, maybe someone would have a look at this and let me know what is going on. I thought I had it working but it's not.
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Try this:
Private Sub CommandButton3_Click() Response = MsgBox("Do You Have T. P Vehicle Info To Add?", vbYesNo) If Response = vbYes Then MultiPage1.Value = 1 Name1.SetFocus Else Response = MsgBox("Do You Have T. P. Injury & Cargo Info To Add? ", vbYesNo) If Response = vbYes Then MultiPage2.Value = 2 Nametp1.SetFocus Else CommandButton1_Click End If End If End Sub Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|