Howdy gang. Great forum. I've searched, tried several ideas (code), but have not found the one that works yet.
Ref: Excel 2000 workbook used by several users. For sheet1 only, one user wants the zoom set to 87%, the others want the zoom at 100%. In order to make it a little easier for them I have created a (control toolbox) command button that switches (toggles) between the two zoom levels.
Private Sub cmdZoom_Click()
If cmdZoom.Caption = "87%" Then
cmdZoom.Caption = "100%"
ActiveWindow.Zoom = 87
ElseIf cmdZoom.Caption = "100%" Then
cmdZoom.Caption = "87%"
ActiveWindow.Zoom = 100
End If
End Sub
The worksheet is set to always open at 87% zoom:
Private Sub Workbook_Open()
ActiveWindow.Zoom = 87
End Sub
Question:
Upon Workbook_Open, how do I ensure (change) the button caption so it is always "100%"? This way the first click will change the zoom to 100%.
I know I am close, but seem to be dancing around just the correct code.
Thanks, Ross
Ref: Excel 2000 workbook used by several users. For sheet1 only, one user wants the zoom set to 87%, the others want the zoom at 100%. In order to make it a little easier for them I have created a (control toolbox) command button that switches (toggles) between the two zoom levels.
Private Sub cmdZoom_Click()
If cmdZoom.Caption = "87%" Then
cmdZoom.Caption = "100%"
ActiveWindow.Zoom = 87
ElseIf cmdZoom.Caption = "100%" Then
cmdZoom.Caption = "87%"
ActiveWindow.Zoom = 100
End If
End Sub
The worksheet is set to always open at 87% zoom:
Private Sub Workbook_Open()
ActiveWindow.Zoom = 87
End Sub
Question:
Upon Workbook_Open, how do I ensure (change) the button caption so it is always "100%"? This way the first click will change the zoom to 100%.
I know I am close, but seem to be dancing around just the correct code.
Thanks, Ross