Proper way to display the top left portion of a worksheet when activating it

  • Hi,


    I would like to know what is the proper way to have a worksheet display the top left portion of a worksheet when activating it.



    As of right now I am using.

    Code
    Sheets("test").activate
    range("a1").select


    And it does not seem to work fine.


    Thank you for your help.

  • Re: Proper way to display the top left portion of a worksheet when activating it


    I usually use this. Not sure if it's the proper way or not.

    Code
    With ActiveWindow
        .ScrollRow = 1
        .ScrollColumn = 1
    End With
  • Re: Proper way to display the top left portion of a worksheet when activating it


    Quote from trunten;601875

    I usually use this. Not sure if it's the proper way or not.

    Code
    With ActiveWindow
        .ScrollRow = 1
        .ScrollColumn = 1
    End With


    Is there a way to have this code in thisworbook module so that every in every worksheet it is always the top left portion of the worksheet that is displayed?

  • Re: Proper way to display the top left portion of a worksheet when activating it


    Little late to the game here, but try this in a workbook module:


    Code
    Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    With ActiveWindow
        .ScrollRow = 1
        .ScrollColumn = 1
    End With
    End Sub
  • Re: Proper way to display the top left portion of a worksheet when activating it


    Code
    Private Sub Worksheet_Activate()
    
    
        With Me
            Application.Goto reference:=.Range("A1"), scroll:=True
        End With
    
    
    End Sub


    Place the code in the worksheet module

  • Re: Proper way to display the top left portion of a worksheet when activating it


    all of the above works fine.


    Thank you very much for the help

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!