Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable a few commandbars, but when duplicates?

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Disable a few commandbars, but when duplicates?

Sorry!

Already DONE!

Thanks anyway

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel CommandBars Daniel Utsch[_2_] Excel Discussion (Misc queries) 3 December 14th 08 07:17 PM
Commandbars Libby Excel Programming 1 August 8th 04 07:11 PM
CommandBars garry Excel Programming 3 June 24th 04 03:12 PM
Disable Commandbars [email protected] Excel Programming 1 May 19th 04 07:29 AM
CommandBars defj Excel Programming 2 November 16th 03 12:57 AM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"