A
Andoni
Hi and many thanks in advance!
I am using this Macro to disable 2 controls from the differen
CommandBars:
sub Example()
Dim Ctl As CommandBarControl
Dim Cbar As Integer
Dim MyArray
Dim X As Byte
Application.ScreenUpdating = False
MyArray = Array(4, 109)'just eg, actually is bigger
On Error Resume Next
For Cbar = 1 To Application.CommandBars.Count
For Each Ctl In CommandBars(Cbar).Controls
For X = LBound(MyArray) To UBound(MyArray)
Application.CommandBars(Cbar).FindControl(Id:=MyArray(X)
Recursive:=True).Enabled = False
Next X
Next Ctl
Next Cbar
End Sub
'My problem comes, because when checking, if I put in: say the standa
toolbar 5 different PrintPreview controls, I will only disable on
them!
so is easy to cheat the program!
How can i solve this
I am using this Macro to disable 2 controls from the differen
CommandBars:
sub Example()
Dim Ctl As CommandBarControl
Dim Cbar As Integer
Dim MyArray
Dim X As Byte
Application.ScreenUpdating = False
MyArray = Array(4, 109)'just eg, actually is bigger
On Error Resume Next
For Cbar = 1 To Application.CommandBars.Count
For Each Ctl In CommandBars(Cbar).Controls
For X = LBound(MyArray) To UBound(MyArray)
Application.CommandBars(Cbar).FindControl(Id:=MyArray(X)
Recursive:=True).Enabled = False
Next X
Next Ctl
Next Cbar
End Sub
'My problem comes, because when checking, if I put in: say the standa
toolbar 5 different PrintPreview controls, I will only disable on
them!
so is easy to cheat the program!
How can i solve this