Ryanchris
11-13-2019, 11:38 AM
Hi all! Would really appreciate some help. I basically have a "Reset" button but I have one textbox that I'd like to not reset/clear when the button is pushed. I'm a big newbie and just not sure how to do that. Here is the code that I have...thank you in advance for your help!! The Textbox that I need to not clear is labelled "SysNameText"
Private Sub CommandButton23_Click()
n = MsgBox("Do not forget to UPLOAD your kit. Are you sure you want to continue?", vbYesNo, "New Config")
If n = vbYes Then
Dim ctl As Control
For Each ctl In PipeKitConfig.Controls
If TypeName(ctl) = "TextBox" Then
ctl.Value = ""
End If
Next ctl
For Each ctl In PipeKitConfig.Controls
If TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
End If
Next ctl
End If
End Sub
Private Sub CommandButton23_Click()
n = MsgBox("Do not forget to UPLOAD your kit. Are you sure you want to continue?", vbYesNo, "New Config")
If n = vbYes Then
Dim ctl As Control
For Each ctl In PipeKitConfig.Controls
If TypeName(ctl) = "TextBox" Then
ctl.Value = ""
End If
Next ctl
For Each ctl In PipeKitConfig.Controls
If TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
End If
Next ctl
End If
End Sub