aziztt
09-15-2008, 10:26 AM
Im sure there is a simple solution but been trying for hours. :banghead:
I'll keep it simple. I have a userform that has many command buttons that calls procedure on how to change the user interface of userform. For example:
Private Sub ChangeFormUI()
Userform1.Height = 200
Userform1Button2.Visible = True
Userform1Button3.Visible = True
Userform1Button10.Visible = False
Userform1Button16.Visible = True
End Sub
Private Sub Userform1Button1_Click()
ChangeFormUI
End Sub
In all works perfectly fine when CommandButton "Userform1Button1" is pressed. :thumb
My issue is i created two command buttons on "Sheet1" of worksheet to show my Userform1 in different layout.
I want the first button that loads Userform1 as normal.
Second button to show as though Userform1Button1 in Userform1 was pressed when Userform1 starts.
Ive tried the following on "Sheet1" but doesnt call ChangeFormUI procedure to change UI layout of Userform1
Private Sub CommandButton1_Click()
Userform1.Show
End Sub
Private Sub CommandButton2_Click()
Userform1.Show
Userform1.ChangeFormUI
End Sub
Any ideas? : pray2:
I'll keep it simple. I have a userform that has many command buttons that calls procedure on how to change the user interface of userform. For example:
Private Sub ChangeFormUI()
Userform1.Height = 200
Userform1Button2.Visible = True
Userform1Button3.Visible = True
Userform1Button10.Visible = False
Userform1Button16.Visible = True
End Sub
Private Sub Userform1Button1_Click()
ChangeFormUI
End Sub
In all works perfectly fine when CommandButton "Userform1Button1" is pressed. :thumb
My issue is i created two command buttons on "Sheet1" of worksheet to show my Userform1 in different layout.
I want the first button that loads Userform1 as normal.
Second button to show as though Userform1Button1 in Userform1 was pressed when Userform1 starts.
Ive tried the following on "Sheet1" but doesnt call ChangeFormUI procedure to change UI layout of Userform1
Private Sub CommandButton1_Click()
Userform1.Show
End Sub
Private Sub CommandButton2_Click()
Userform1.Show
Userform1.ChangeFormUI
End Sub
Any ideas? : pray2: