View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Marc Marc is offline
external usenet poster
 
Posts: 16
Default Can a macro be written that when you open a workbook the zoom will be set for each sheet?

Spoke to soon. I copied it and change the 100 to 75 and tried to run it and
I get a run time error '1004' "Select method of Worksheet class failed".

Marc

"dok112" wrote in
message ...

Yes.

In Microsoft Visual Basic Editor, under ObjectsThisWorkbook, input the
following code:

Private Sub Workbook_Open()
For Each ws In Worksheets
ws.select
ActiveWindow.Zoom = 100
Next
End Sub

Change the zoom to whatever zoom you want it to be. do not include the
% symbol


--
dok112
------------------------------------------------------------------------
dok112's Profile:

http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=530168