How to zoom in VBA

J

Jim

I want to zoom the page out like 70% like when you go to View --> Zoom
-->70%. How do i write it in VBA? I know PageSetup has the zoom for printing,
I tried it but doesnt actually zoom the sheet. Any help will be much
appreciated! Thanks
 
H

Harald Staff

When in doubt of syntax, record a macro while doing it manually. You should
get a result like


Sub Macro1()
ActiveWindow.Zoom = 70
End Sub

HTH. Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top