ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   set excel zoom in 80 (https://www.excelbanter.com/excel-programming/338852-set-excel-zoom-80-a.html)

Julio

set excel zoom in 80
 
Hello, how can i set the excel program zoom in 80% forever. In order to each
time i open the application it opens with zoom = 80%

Tom Ogilvy

set excel zoom in 80
 
zoom is associated with each worksheet. It is not an application level
setting. You would probably need to instantiate application level events
and use the sheet activate event to set the zoom.

http://www.cpearson.com/Excel/appevent.htm
Chip Pearson's page on application level events.

--
Regards,
Tom Ogilvy


"Julio" wrote in message
...
Hello, how can i set the excel program zoom in 80% forever. In order to

each
time i open the application it opens with zoom = 80%




Dave Peterson

set excel zoom in 80
 
For brand new workbooks, you could create a book.xlt workbook template (stored
in your XLStart folder) that has each window the way you want.

If you want existing workbooks, then ...

Saved from a previous post:

Create a new workbook.
Add this code to the ThisWorkbook module:

Option Explicit
Public WithEvents xlApp As Application
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set xlApp = Nothing
End Sub
Private Sub Workbook_Open()
Set xlApp = Excel.Application
End Sub
Private Sub xlApp_NewWorkbook(ByVal Wb As Workbook)
Call DoTheWork(Wb)
End Sub
Private Sub xlApp_SheetActivate(ByVal Sh As Object)
Call DoTheWork(Sh.Parent)
End Sub
Private Sub xlApp_WorkbookOpen(ByVal Wb As Workbook)
Call DoTheWork(Wb)
End Sub
Private Sub DoTheWork(Wb As Workbook)
Dim myWindow As Window
For Each myWindow In Wb.Windows
myWindow.Zoom = 75
Next myWindow
End Sub

Save this file as an addin in your XLStart folder.

Each time you create a new workbook, open an existing workbook, change to a new
sheet, it'll set the zoom to 75%.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

You can read a lot more about application events at Chip Pearson's site:
http://www.cpearson.com/excel/AppEvent.htm

Julio wrote:

Hello, how can i set the excel program zoom in 80% forever. In order to each
time i open the application it opens with zoom = 80%


--

Dave Peterson

Dave Peterson

set excel zoom in 80
 
Change that 75 to 80.

Oopsie.


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com