• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Fix Display Into The Screen

cyliyu

Member
Dear All,

I have the macro as follow to fix the display into the user's screen. This is only when the user opens the excel spreadsheet and click on the button.

The range was pre-defined to be from A1 to T1.

Code:
Sub Auto_open()
  Range("A1:T1").Select
  ActiveWindow.Zoom = True
  Range("A1").Select
End Sub

1) How can I make it that it will run automatically each time the spreadsheet was opened?

2) I have a workbook with few spreadsheet; each has to define the range. e.g. sheet1 - A1: T1, Sheet2 - A1: S1 and so on. is it possible to have a standard code to auto adjust to the user screen?
 
Last edited by a moderator:
The code listed by David above goes in the Workbook Object in VBA
upload_2017-10-2_17-8-4.png

If you want to set different parameters for each Worksheet, Add a similar event to the Worksheet Objects in VBA
But use the Worksheet_Activate event

upload_2017-10-2_17-9-41.png
 
Back
Top