Something Similar to MsgBox

  • Thread starter Thread starter documike
  • Start date Start date
D

documike

Is there something similar to MsgBox that can be called via macro, only
instead of a message, I could put a couple of buttons inside of it giving
the user a choice of which sheet to jump to?
 
documike

You could use a user form. I created one and then put 3 command buttons on
it. You would use this code, in a standard module to launch the form
(UserForm1)

Sub ShowFrm1()
UserForm1.Show
End Sub

and this code would sit behind each button

Private Sub CommandButton1_Click()
Worksheets("Sheet1").Activate
Unload Me
End Sub

Private Sub CommandButton2_Click()
Worksheets("Sheet2").Activate
Unload Me
End Sub

Private Sub CommandButton3_Click()
Worksheets("Sheet3").Activate
Unload Me

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Did you know that you can rightclick on those VCR like controls to the left of
the worksheet tabs and see a list of your worksheets (and if you have lots,
you'll see an option to show more).
 
Back
Top