rickwithers
New Member
- Joined
- Sep 13, 2013
- Messages
- 12
I have the following code to try to zoom to a selection dependent on the worksheet being opened:
zArea = "A1:" & Range("BA6").value (Sets String zArea to A1: and the last cell in range as given in cell BA6 on each worksheet)
Range(zArea).Select
ActiveWindow.Zoom = True
The problem I have is the correct sheet opens, but the zoom level defaults to 400% at cell A1. For one particular worksheet, cell BA6 = AH61, therefore zArea = A1:AH61. Using MsgBox confirmed the value, however, the Zoom property doesn't accept it. Any suggestions?
zArea = "A1:" & Range("BA6").value (Sets String zArea to A1: and the last cell in range as given in cell BA6 on each worksheet)
Range(zArea).Select
ActiveWindow.Zoom = True
The problem I have is the correct sheet opens, but the zoom level defaults to 400% at cell A1. For one particular worksheet, cell BA6 = AH61, therefore zArea = A1:AH61. Using MsgBox confirmed the value, however, the Zoom property doesn't accept it. Any suggestions?