Can anyone please tell me how I get all worksheets in a workbook to open with a set zoom so that I can see all the information on one screen without scrolling.
thanks
David
Can anyone please tell me how I get all worksheets in a workbook to open with a set zoom so that I can see all the information on one screen without scrolling.
thanks
David
Hi, Daavid,
I never felt happy when my data is quenched in on 10% zoom.
![]()
Sub EF953851() Dim wsTab As Worksheet Dim lngZoom As Integer lngZoom = Application.InputBox(prompt:="Please advice the Zoom as a number between 10 and 400", _ Default:=75, Type:=1) If lngZoom < 10 Then lngZoom = 10 If lngZoom > 400 Then lngZoom = 400 For Each wsTab In ActiveWorkbook.Worksheets wsTab.Select ActiveWindow.Zoom = lngZoom Next wsTab End Sub
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
stdm11,
HaHoBe's code definitely works and should solve your problem elegantly. The only two minor changes I would make to it are the following:
[1] Place the code in the ThisWorkbook object (which you can see in the navigation pane of your Visual Basic Editor) instead of having the code in a module. In your Visual Basic Editor, simply double click ThisWorkbook to open it.
[2] Change the "Sub EF953851()" line in the above code to "Sub Workbook_Open()". This way, you have the desired zoom each and every time you open the spreadsheet. You are taking advantage of the workbook's open event.
____________________________________
1. If this answer helped, please click the star to the left of this reply.
2. If this answer solved your problem, please mark this thread as [SOLVED].
Last edited by Dimitrov; 09-10-2013 at 11:03 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks