Worksheet not scrolling to top of sheet on switching to a different sheet

  • Hello,


    I am using this code to scroll to the top of the sheet when switching worksheets but its not working, would appreciate any help.


    Scenario


    Have a button on Sheet1 which onclick takes me to sheet 2, row 20
    when i go back to sheet1 or any other sheet i want sheet 2 to scroll up all the way A1.
    I have the code on Sheet2 which is not working


    Code
    1. Private Sub Worksheet_Selectionchane(ByVal Target As Range)
    2. Application.Goto Reference = Range("A1"), Scroll = True
  • Re: Worksheet not scrolling to top of sheet on switching to a different sheet


    Morning,


    Instead of using Worksheet_Selectionchange use Worksheet_Activate.


    Worksheet_selectionchange will not trigger when just switching to the sheet, it is waiting for a 'change'. Activate will.



    Regards


    Andrew