inactiveUser214710
Board Regular
- Joined
- Apr 27, 2012
- Messages
- 171
Hello everyone
I have a userform with several commdandbuttons and I use the code below to close all, when I give instrution for that.
But I need just one that must be open and not closed
How can i do for that exception.
Thank you
I have a userform with several commdandbuttons and I use the code below to close all, when I give instrution for that.
But I need just one that must be open and not closed
How can i do for that exception.
Thank you
Code:
Sub resertFormClose()
Dim ctl
For Each ctl In UserForm1.Controls
If TypeOf ctl Is msforms.CommandButton Then
ctl.Value = False
ctl.BackColor = RGB(192, 192, 192)
ctl.Enabled = False
ctl.TabStop = True
End If
Next ctl
End Sub