I have the following code which runs upon opening my workbook. How would I
include to View of this quot;Current Weekquot; to 75% upon open also? I have a user
that changes it to 100% each time they use it
Thanks
Private Sub Workbook_Open()
Application.ScreenUpdating = False
Dim sh As Worksheet
For Each sh In ThisWorkbook.Worksheets
sh.Select
Application.Goto Reference:=sh.Range(quot;a1quot;), Scroll:=True
Next sh
ThisWorkbook.Sheets(quot;Current Weekquot;).Select
Application.ScreenUpdating = True
Range(quot;C6quot;).Select
End Sub
Try adding this to the end of the code
activewindow.Zoom=75%
--
HTH
Bob Phillips
(remove nothere from email address if mailing direct)
quot;Johnquot; gt; wrote in message
...
gt; I have the following code which runs upon opening my workbook. How would I
gt; include to View of this quot;Current Weekquot; to 75% upon open also? I have a
user
gt; that changes it to 100% each time they use it
gt;
gt; Thanks
gt;
gt;
gt;
gt; Private Sub Workbook_Open()
gt; Application.ScreenUpdating = False
gt; Dim sh As Worksheet
gt; For Each sh In ThisWorkbook.Worksheets
gt; sh.Select
gt; Application.Goto Reference:=sh.Range(quot;a1quot;), Scroll:=True
gt; Next sh
gt; ThisWorkbook.Sheets(quot;Current Weekquot;).Select
gt; Application.ScreenUpdating = True
gt; Range(quot;C6quot;).Select
gt;
gt; End Sub
gt;
gt;
John wrote...
gt;I have the following code which runs upon opening my workbook. How would I
gt;include to View of this quot;Current Weekquot; to 75% upon open also? I have a user
gt;that changes it to 100% each time they use it
....
The macro recorder is your friend.
ActiveWindow.Zoom = 75
That said, is your goal to prevent this user from saving the workbook
with this particular worksheet's Zoom property set to 100 or to force
the user to view this worksheet at 75 zoom?Thanks Bob
quot;Bob Phillipsquot; gt; wrote in message
...
gt; Try adding this to the end of the code
gt;
gt; activewindow.Zoom=75%
gt;
gt; --
gt; HTH
gt;
gt; Bob Phillips
gt;
gt; (remove nothere from email address if mailing direct)
gt;
gt; quot;Johnquot; gt; wrote in message
gt; ...
gt;gt; I have the following code which runs upon opening my workbook. How would
gt;gt; I
gt;gt; include to View of this quot;Current Weekquot; to 75% upon open also? I have a
gt; user
gt;gt; that changes it to 100% each time they use it
gt;gt;
gt;gt; Thanks
gt;gt;
gt;gt;
gt;gt;
gt;gt; Private Sub Workbook_Open()
gt;gt; Application.ScreenUpdating = False
gt;gt; Dim sh As Worksheet
gt;gt; For Each sh In ThisWorkbook.Worksheets
gt;gt; sh.Select
gt;gt; Application.Goto Reference:=sh.Range(quot;a1quot;), Scroll:=True
gt;gt; Next sh
gt;gt; ThisWorkbook.Sheets(quot;Current Weekquot;).Select
gt;gt; Application.ScreenUpdating = True
gt;gt; Range(quot;C6quot;).Select
gt;gt;
gt;gt; End Sub
gt;gt;
gt;gt;
gt;
gt;
How could I prevent the change of the Zoom property Harlan?quot;Harlan Grovequot; gt; wrote in message ps.com...
gt; John wrote...
gt;gt;I have the following code which runs upon opening my workbook. How would I
gt;gt;include to View of this quot;Current Weekquot; to 75% upon open also? I have a
gt;gt;user
gt;gt;that changes it to 100% each time they use it
gt; ...
gt;
gt; The macro recorder is your friend.
gt;
gt; ActiveWindow.Zoom = 75
gt;
gt; That said, is your goal to prevent this user from saving the workbook
gt; with this particular worksheet's Zoom property set to 100 or to force
gt; the user to view this worksheet at 75 zoom?
gt;
quot;Johnquot; gt; wrote...
gt;How could I prevent the change of the Zoom property Harlan?
....
Mine was a rhetorical question. Can't be done. While it may be possible to
disable or remove the Zoom entry from the View menu, there are other ways to
change the zoom setting. You could use the WorksheetSelectionChange event
handler to reset the zoom to 75, but that'd only be annoying. Just let your
users change the zoom setting as long as you have macros that'll reset it
every time anyone opens the workbook.
- Apr 21 Sat 2007 20:36
Set View to 75% upon Workbook open
close
全站熱搜
留言列表
發表留言