redspanna
Well-known Member
- Joined
- Jul 27, 2005
- Messages
- 1,604
- Office Version
- 365
- Platform
- Windows
Hi all
I use the following simple code to clear my userform each time the user 'adds' some data (this is done by selecting the add button)
however when the userform is displayed again the three checkbox(s) are populated with tick and are all 'grayed out' - I want them empty ie unchecked
can the above code be changed to reflect this?
many thanks
I use the following simple code to clear my userform each time the user 'adds' some data (this is done by selecting the add button)
Code:
Sub Clear()
'clear the data
Me.TextBox1.Value = ""
Me.TextBox2.Value = ""
Me.ComboBox1.Value = ""
Me.ComboBox2.Value = ""
Me.ComboBox3.Value = ""
Me.ComboBox4.Value = ""
Me.ComboBox5.Value = ""
Me.ComboBox6.Value = ""
Me.ComboBox7.Value = ""
Me.ComboBox8.Value = ""
Me.ComboBox9.Value = ""
Me.CheckBox1.Value = ""
Me.CheckBox2.Value = ""
Me.CheckBox3.Value = ""
If CheckBox1 = True Then
CheckBox1 = False
If CheckBox2 = True Then
CheckBox2 = False
If CheckBox3 = True Then
CheckBox3 = False
End If
End If
End If
Me.Hide
ActiveWorkbook.Save
Sheets("front").Select
added.Show
End Sub
can the above code be changed to reflect this?
many thanks