Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default 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
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
Use VBA to change &File Control in Worksheet Menu Bar RyanH Excel Programming 0 October 1st 08 08:44 PM
Zoom window to selection Won Excel Programming 1 August 12th 08 09:25 PM
Zoom window to selection (further clarification) Won Excel Programming 2 August 12th 08 06:51 PM
Zoom Window Selection Possible? None Excel Programming 3 December 26th 06 10:23 PM
Excel Window zoom Jason Zischke Excel Programming 0 July 26th 06 11:23 PM


All times are GMT +1. The time now is 12:48 AM.

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

About Us

"It's about Microsoft Excel"