Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default How to zoom in VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default How to zoom in VBA

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

"Jim" wrote in message
...
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,069
Default How to zoom in VBA

Sub ZoomTo70()
ActiveWindow.Zoom = 70
End Sub

If you are new to macros), this link to Jon Peltier's site may be helpful:
http://peltiertech.com/WordPress/200...e-elses-macro/

Hope this helps,

Hutch

"Jim" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default How to zoom in VBA

Hi,

Try this in your code

ActiveWindow.Zoom = 70

Mike

"Jim" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
Jim Jim is offline
external usenet poster
 
Posts: 615
Default How to zoom in VBA

Thankyou all! I always forget about recording macros.

"Harald Staff" wrote:

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

"Jim" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zoom Gary''s Student Excel Discussion (Misc queries) 3 October 14th 09 06:37 PM
Please help! Print Preview Zoom is Grayed Out...Doesn't zoom. PK Excel Discussion (Misc queries) 0 July 20th 09 03:33 PM
Zoom in/Zoom out picture [email protected] Excel Programming 1 January 27th 08 04:19 PM
zoom in &zoom out in VBA User Form [email protected] Excel Programming 0 January 21st 08 04:59 AM
Zoom David Excel Programming 2 October 15th 03 12:53 PM


All times are GMT +1. The time now is 08:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"