W
WLMPilot
I have a userform with optionbutton3 that will make certain labels/textboxes
invisible when TRUE. If optionbutton3 is TRUE and then user clicks FINISHED,
the userform will HIDE.
The problem is when the userform is executed again and those
labels/textboxes are still invisible. I appreciate any input on how to fix
this!
Below are two macros. The first shows the userform. The second is the one
that should initialize the userform, making all visible:
Sub TimeCalc()
Dim TextBox1 As String
Dim TextBox2, TextBox3 As String
TimeCalcFm.Show
End Sub
Private Sub UserForm_Initialize()
Me.Label1.Caption = "Enter Date Worked"
Me.Label2.Visible = True
Me.Label3.Visible = True
Me.Label4.Visible = True
Me.TextBox2.Visible = True
Me.TextBox3.Visible = True
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
Me.OptionButton1.Value = True
Me.TextBox1.SetFocus
End Sub
Thanks,
Les
invisible when TRUE. If optionbutton3 is TRUE and then user clicks FINISHED,
the userform will HIDE.
The problem is when the userform is executed again and those
labels/textboxes are still invisible. I appreciate any input on how to fix
this!
Below are two macros. The first shows the userform. The second is the one
that should initialize the userform, making all visible:
Sub TimeCalc()
Dim TextBox1 As String
Dim TextBox2, TextBox3 As String
TimeCalcFm.Show
End Sub
Private Sub UserForm_Initialize()
Me.Label1.Caption = "Enter Date Worked"
Me.Label2.Visible = True
Me.Label3.Visible = True
Me.Label4.Visible = True
Me.TextBox2.Visible = True
Me.TextBox3.Visible = True
Me.TextBox1 = ""
Me.TextBox2 = ""
Me.TextBox3 = ""
Me.OptionButton1.Value = True
Me.TextBox1.SetFocus
End Sub
Thanks,
Les