Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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:=MyAr ray(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 -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel CommandBars | Excel Discussion (Misc queries) | |||
Commandbars | Excel Programming | |||
CommandBars | Excel Programming | |||
Disable Commandbars | Excel Programming | |||
CommandBars | Excel Programming |