Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting all sheets in workbook to same zoom level?
I'd like to add a button to my application that sets all the sheet zooms to
a zoom level as specified by the user. The below works, but is there a simpler way? Sub Zoom() Dim WS As Worksheet, OrgWS As Worksheet Application.ScreenUpdating = False Set OrgWS = ActiveSheet For Each WS In Application.Worksheets WS.Select ActiveWindow.Zoom = 85 Next WS OrgWS.Select End Sub The above would have problems with hidden sheets. So to work properly it would have to be modified to detect them, then to rehide them. Don <www.donwiss.com (e-mail link at home page bottom). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting all sheets in workbook to same zoom level?
Hi Don,
Try this: Sub Zoom() Dim WS As Worksheet, OrgWS As Worksheet Application.ScreenUpdating = False Set OrgWS = ActiveSheet For Each WS In Worksheets If WS.Visible Then WS.Select ActiveWindow.Zoom = 85 Else WS.Visible = xlSheetVisible WS.Select ActiveWindow.Zoom = 85 WS.Visible = xlSheetHidden End If Next WS OrgWS.Select End Sub Rgds, halim Don Wiss menuliskan: I'd like to add a button to my application that sets all the sheet zooms to a zoom level as specified by the user. The below works, but is there a simpler way? Sub Zoom() Dim WS As Worksheet, OrgWS As Worksheet Application.ScreenUpdating = False Set OrgWS = ActiveSheet For Each WS In Application.Worksheets WS.Select ActiveWindow.Zoom = 85 Next WS OrgWS.Select End Sub The above would have problems with hidden sheets. So to work properly it would have to be modified to detect them, then to rehide them. Don <www.donwiss.com (e-mail link at home page bottom). |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
setting all sheets in workbook to same zoom level?
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing zoom level automatically | Excel Worksheet Functions | |||
Zoom level | Excel Discussion (Misc queries) | |||
Zoom level | Excel Discussion (Misc queries) | |||
setting Page Setup on a workbook level | Excel Discussion (Misc queries) | |||
Setting zoom of 2 sheets equal | Excel Programming |