Results 1 to 7 of 7
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Set Scroll Area Problem (Excel 2002)

    Hi

    When I right click on a worksheet Tab named "Input" and select view code, then set the scroll area to $A$1:$L500 it works fine, but when I save the file and close and re-open it,
    the scroll are settings have disappeared. Any Ideas please?

    Thanks

    Braddy
    If you are a fool at forty, you will always be a fool

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Set Scroll Area Problem (Excel 2002)

    Put the scroll area in a workbook open macro. It is "volatile" it is not saved with the workbook.

    Steve

  3. #3
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Set Scroll Area Problem (Excel 2002)

    The scroll area is not saved with the workbook. You can add the following line to the Workbook_Open routine to set the scroll area whenever you open the workbook.

    <code>Sheets("Input").ScrollArea = "$A$1:$L500"</code>

  4. #4
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Set Scroll Area Problem (Excel 2002)

    Hi Tony

    Thanks for your reply and also to steve for pointing this out.

    Braddy
    If you are a fool at forty, you will always be a fool

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Set Scroll Area Problem (Excel 2002)

    The scroll area is not saved with the workbook. You can set it in the Workbook_Open event procedure:
    - Activate the Visual Basic Editor (Alt+F11)
    - Double click ThisWorkbook for the appropriate workbook.
    - Select Workbook from the dropdown list in the upper left corner of the module window.
    - Complete the code like this:

    Private Sub Workbook_Open()
    Worksheets("Input").ScrollArea = "A1:L500"
    End Sub

    - If you already had a Workbook_Open procedure, just add the line

    Worksheets("Input").ScrollArea = "A1:L500"

  6. #6
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Set Scroll Area Problem (Excel 2002)

    Hi Braddy....

    Hows that for some answers to a question!!! When I read this thread I developed a picture in my head of standing in front of a large canyon. I shout "How do you set the scroll area in VBA?" And back comes 3 loud echo's that it must be added to the Workbook_Open event!!!

    Continue echoing guys....your voices together make a chorus to be proud of!!! <img src=/S/joy.gif border=0 alt=joy width=23 height=23>
    Regards,
    Rudi

  7. #7
    Silver Lounger
    Join Date
    Dec 2000
    Location
    Northampton, Northamptonshire, England
    Posts
    1,951
    Thanks
    2
    Thanked 1 Time in 1 Post

    Re: Set Scroll Area Problem (Excel 2002)

    HI Hans

    I do indeed have a Workbook_Open event procedure, and after adding the line everything is now Hunkey Dorey.

    Thanks to all who replied.

    Braddy
    If you are a fool at forty, you will always be a fool

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •