Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There may not be an active window when you code runs, it this is happening
when Excel starts. Maybe a little delay will help: Sub Auto_Open() Application.OnTime DateAdd("s", 1, Now), "ZoomIt" End Sub Sub ZoomIt() ActiveWindow.Zoom = 115 End Sub -- Jim Rech Excel MVP "Randy Chow" wrote in message ... IT Fired Up.ComGood day everyone. I was wondering if someone can give me a pointer as to why the below routine errors out when put into a .xla Add-In. I want this Add-In to autorun and change the Zoom value to 115%. I get the following error "Object Variable or With Block Variable Not Set". Thanks for everyones support. Sub Auto_Open() Worksheets("Sheet1").Activate ActiveWindow.Zoom = 115 End Sub Randy Chow - BSc. of Science, MCSE, MCDBA, CCNA, A+, NetCERT+ IT Fired Up.Com Phone Number: (403) 605-5575 Email: IT Fired Up.Com Copyright © 2003 Email: |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Please help! Print Preview Zoom is Grayed Out...Doesn't zoom. | Excel Discussion (Misc queries) | |||
Setting the zoom size of a new window from 100% to 75% | Excel Discussion (Misc queries) | |||
Problems with Live Window preview | Excel Discussion (Misc queries) | |||
VBE Window Docking Problems | Excel Programming | |||
application.screenupdating problems and IE browser window | Excel Programming |