PC Review


Reply
Thread Tools Rate Thread

Change Zoom Value of Window with ComboBox in Custom Menu Control

 
 
RyanH
Guest
Posts: n/a
 
      17th Oct 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom support in custom control Ashutosh Microsoft C# .NET 3 30th Apr 2009 11:37 AM
Zoom support in custom control Ashutosh Microsoft Dot NET 2 29th Apr 2009 05:03 PM
Navigating to URL in "new window" with custom context menu inwebbrowser control? kimiraikkonen Microsoft VB .NET 0 9th Feb 2008 11:13 AM
How do I get a datagrid to register a data change from a custom control cell (combobox)? =?Utf-8?B?bWV0YW1lZGlh?= Microsoft Dot NET Framework Forms 0 7th May 2004 11:31 PM
How do I get a datagrid to register a data change from a custom control cell (combobox)? =?Utf-8?B?bWV0YW1lZGlh?= Microsoft C# .NET 0 7th May 2004 11:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:37 AM.