G
Guest
I have a mnuNew_Click event that I am attempting to reset a forms textbox,
checkbox and picturebox's. The attached code is an attempt to loop through
the forms controls and reset them but I cannot find any option within the
controls class to set the properties for the checkbox and the picture box.
Dim tabCtl as TabControl
Dim tabPg as TabPage
Dim ctl as Control
tabCtl = Me.tabName
For Each tabPg In tabCtl.TabPages
For Each ctl In tabPg.Controls
If TypeOf(ctl) Is TextBox Then
ctl.Text = vbNullString 'Code works
ElseIf TypeOf(ctl) Is CheckBox Then
'ctl. ??? '=vbUnchecked
'.Checked & .Value are not options
ElseIf TypeOf(ctl) Is PictureBox Then
'ctl. ??? '= Nothing
'.Value is not an option???
End If
Next
Next
Any assistance would be greatly appreciated. Thanks
checkbox and picturebox's. The attached code is an attempt to loop through
the forms controls and reset them but I cannot find any option within the
controls class to set the properties for the checkbox and the picture box.
Dim tabCtl as TabControl
Dim tabPg as TabPage
Dim ctl as Control
tabCtl = Me.tabName
For Each tabPg In tabCtl.TabPages
For Each ctl In tabPg.Controls
If TypeOf(ctl) Is TextBox Then
ctl.Text = vbNullString 'Code works
ElseIf TypeOf(ctl) Is CheckBox Then
'ctl. ??? '=vbUnchecked
'.Checked & .Value are not options
ElseIf TypeOf(ctl) Is PictureBox Then
'ctl. ??? '= Nothing
'.Value is not an option???
End If
Next
Next
Any assistance would be greatly appreciated. Thanks