Is it possible to set up zoom level based on screen resolution without Select
?
I have followed the code:
Sheets(1).Range("A1:AC1").Select
ActiveWindow.Zoom = True
taken from https://stackoverflow.com/a/19439177/1903793
Desired code would be something like:
Range("A1:AC1").Width.Zoom=True
Update. Why do I want to avoid Select?
That is what I have ended up with. Solution is resistant to hidden columns. I do not select columns but shape. Add a rectangle, name it "BoxForZoom". It should be wide just enough for your zoom. Then apply the following code:
Sheet1.Shapes("BoxForZoom").Visible = True
Sheet1.Shapes("BoxForZoom").Select
ActiveWindow.Zoom = True
Sheet1.Shapes("BoxForZoom").Visible = False