Hi All,
I am fairly new to userform's so any help would be greatly appreciated.
Scenario - I have two userform's in excel 2013, when a button ("CommandButton3" or "CommandButton5") on the first userform (MasterPage1) is pressed it opens a second userform (Layer12) which contains a multipage. I want to select a certain tab, based on which button was pressed on the previous userform.
my code:
I have also tried:Private Sub UserForm_Initialize() Select Case Application.Caller Case "CommandButton3" '1st tab Me.MultiPage1.Value = 0 '3rd tab Case "CommandButton5" Me.MultiPage1.Value = 3 End Select End Sub
Neither work.Private Sub UserForm_Initialize() If MasterPage1.CommandButton3.Value = True Then Me.MultiPage1.Value = 0 ElseIf MasterPage1.CommandButton5.Value = True Then Me.MultiPage1.Value = 3 End If End Sub
Any suggestions as to where I am going wrong would be appreciated.
Many Thanks,
Jonathan
Bookmarks