Home » Category » Microsoft Excel

Microsoft Excel: ZOOM

205| Fri, 23 May 2008 17:53:00 GMT| anonymous| Comments (2)
Hello experts,

Is there a way to set Excel to open any/all workbooks/sheets at N%.

Everytime I'm given an xls doc, I end up shrinking it down to 75 or
80% to fit my screen. I'd like Excel to automatically do this
whenever I open any xls doc.

Thanks,
alex

Keywords & Tags: zoom, microsoft, excel

URL: http://www.developertags.com/microsoft-excel/495157/
 
«« Prev - Next »» 2 helpful answers below.
Saved from a previous post:

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 ...

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

alex wrote:
> Hello experts,
> Is there a way to set Excel to open any/all workbooks/sheets at N%.
> Everytime I'm given an xls doc, I end up shrinking it down to 75 or
> 80% to fit my screen. I'd like Excel to automatically do this
> whenever I open any xls doc.
> Thanks,
> alex
--

Dave Peterson

dave | Fri, 23 May 2008 17:55:00 GMT |

On Feb 22, 11:48=A0am, Dave Peterson <peter......verizonXSPAM.net> wrote:
> Saved from a previous post:
> For brand new workbooks, you could create a book.xlt workbook template (st=ored
> in your XLStart folder) that has each window the way you want.
> If you want existing workbooks, then ...
> 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)
> =A0 =A0 Set xlApp =3D Nothing
> End Sub
> Private Sub Workbook_Open()
> =A0 =A0 Set xlApp =3D Excel.Application
> End Sub
> Private Sub xlApp_NewWorkbook(ByVal Wb As Workbook)
> =A0 =A0 Call DoTheWork(Wb)
> End Sub
> Private Sub xlApp_SheetActivate(ByVal Sh As Object)
> =A0 =A0 Call DoTheWork(Sh.Parent)
> End Sub
> Private Sub xlApp_WorkbookOpen(ByVal Wb As Workbook)
> =A0 =A0 Call DoTheWork(Wb)
> End Sub
> Private Sub DoTheWork(Wb As Workbook)
> =A0 =A0 Dim myWindow As Window
> =A0 =A0 For Each myWindow In Wb.Windows
> =A0 =A0 =A0 =A0 myWindow.Zoom =3D 75
> =A0 =A0 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:h=ttp://www.mvps.org/dmcritchie/excel/getstarted.htm
> You can read a lot more about application events at Chip Pearson's site:ht=tp://www.cpearson.com/excel/AppEvent.htm
> alex wrote:
> > Hello experts,
> > Is there a way to set Excel to open any/all workbooks/sheets at N%.
> > Everytime I'm given an xls doc, I end up shrinking it down to 75 or
> > 80% to fit my screen. =A0I'd like Excel to automatically do this
> > whenever I open any xls doc.
> > Thanks,
> > alex
> --
> Dave Peterson

Thanks Dave; the template worked well.

alex

alex | Fri, 23 May 2008 17:56:00 GMT |

Microsoft Excel Hot Answers

Microsoft Excel New questions

Microsoft Excel Related Categories