Posted By

mprabhuram on 02/12/10


Tagged

ExcelMacro


Versions (?)

ZoomIn Excel Macro


 / Published in: Visual Basic
 

URL: http://excel.tips.net/Pages/T002731_Zooming_With_the_Keyboard.html

Notice that the macro only allows you to zoom in up to 400%. This is because Excel allows you to only zoom that high, and any higher would generate an error. A slight variation on the same theme results in a macro I call MyZoomOut. It zooms out of (reduces) a worksheet by 10%:

  1. Sub MyZoomIn()
  2. Dim ZP As Integer
  3. ZP = Int(ActiveWindow.Zoom * 1.1)
  4. If ZP > 400 Then ZP = 400
  5. ActiveWindow.Zoom = ZP
  6. End Sub

Report this snippet  

You need to login to post a comment.