Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Zoom Value of Window with ComboBox in Custom Menu Control
I have a custom menu tab that contains a submenu item which contains 2
comboboxes. The combobox will change the view of several sheets when the combobox is changed. 1.) How do I set the zoom value of all the sheets with the combobox? If there is a better way than what I have, please let me know! Public Sub ChangeDeptViews() SubName = "ChangeDeptViews" ' make sure Global Schedule is the active sheet If Not IsGlobalAvailable() Then Exit Sub End If Application.ScreenUpdating = False ' store current sheet Set wksCurrentSheet = ActiveSheet Sheets(Array("Engineering", "Graph Prod", "Metal Fab", "Alum Ext", _ "Custom Fab", "Electrical", "Ch Ltrs", "Foam Fab", _ "Metal Paint", "Thermo", "Tri Graphics", "Deco Faces", _ "Tri-Face", "LED", "Crating", "Service", "Delivery")).Select Sheets("Engineering").Activate ActiveWindow.Zoom = CommandBars(1).Controls("Depts. View").Value ' restore sheet that was active wksCurrentSheet.Activate Application.ScreenUpdating = False End Sub 2.) I would also like to change the width of the combobox because it will only be holding percentages: 100%, 90%, 80%, etc? I have tried this and it doesn't work. ' Global Schedule View Sub Menu Set SubMenuItem = MenuItem.Controls.Add(Type:=msoControlComboBox) With SubMenuItem .Caption = "Global View" .OnAction = "OnAction2003Calls" .Tag = "combo1" .Width = 10 .AddItem "80%" .AddItem "90%" .AddItem "100%" .AddItem "110%" .AddItem "120%" End With -- Cheers, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Use VBA to change &File Control in Worksheet Menu Bar | Excel Programming | |||
Zoom window to selection | Excel Programming | |||
Zoom window to selection (further clarification) | Excel Programming | |||
Zoom Window Selection Possible? | Excel Programming | |||
Excel Window zoom | Excel Programming |