Apply Zoom VBA to Whole Workbook

SaraWitch

Active Member
Joined
Sep 29, 2015
Messages
370
Office Version
  1. 365
Platform
  1. Windows
Hello peeps!

Does anyone know how to apply the following formula to the whole workbook? (I've tried ActiveWorkbook but that didn't work!)

VBA Code:
Private Sub Workbook_Open()
ActiveWindow.Zoom = 100
End Sub

Ta very muchly! 😊
 
Is the Please Note sheet visible?
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Yes, visible but protected with different password...
 
Upvote 0
That shouldn't make any difference as you aren't trying to do anything to it. That's the only reason I can think of that you would get that error (it's the only Activate line I can see).
 
Upvote 0
Okay, I'll revert to my original coding as that's working as expected. Thank you for your help anyway, Rory 😊
 
Upvote 0
Coding in post #8 was my original coding and is working as expected. Coding in post #4 is giving me the error. ;)
 
Upvote 0
It’s very confusing if you post code and say it’s causing an error but you’re actually talking about other code. Which line is causing the error?
 
Upvote 0
Apologies, Rory.

The code in my post #8 is working (my original).

When speaking of errors, I am referring to the code you kindly offered as a solution in post #4. I don't know which line is causing this, but the error message for this coding (post #4) is:
Run-time error '1004':
Method 'Activate' of object'_Worksheet' failed
 
Upvote 0

Forum statistics

Threads
1,221,448
Messages
6,159,922
Members
451,604
Latest member
SWahl

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top