i have code like this that disables all my command buttons except the one named cmdReset (and it works fine)
what if i want to skip more than just "cmdReset"?
eg i tried
but that seems to disable ALL command buttons including cmdReset and cmdExit...
any thoughts?
Code:
For Each ctl In Main.Controls
If TypeOf ctl Is MSForms.CommandButton Then
If ctl.Name <> "cmdReset" Then
ctl.Enabled = False
End If
End If
Next ctl
what if i want to skip more than just "cmdReset"?
eg i tried
Code:
if ctl.name <> "cmdReset" or ctl.name <> "cmdExit" Then
but that seems to disable ALL command buttons including cmdReset and cmdExit...
any thoughts?