automatically open a sheet in cell A1 from the tab

Anonymous
2019-05-07T00:15:10+00:00

Hi,

I m trying to do the following in my WorkBook in Excel:

When users click on a tab, that it automatically view at cell A1.

Currently some of my sheets open scrolled to the bottom of my view.

If anyone can help, I m pretty new to VBA.

Thanks,

Faycal

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Anonymous
    2019-05-07T00:50:21+00:00

    Hi

    Please try this macro on the workbook code

    **********************************************************

    Private Sub Workbook_SheetActivate(ByVal Sh As Object)

    ActiveSheet.Range("A1").Select

    End Sub

    ******************************************

    Check the picture below

    ****************************************************************************************************

    Do let me know if you require any further help on this. Will be glad to help you.

    If this answer would be the solution to your question, Please, share your appreciation by marking it as answered. I would be grateful to you as well.

    Thanks

    Regards

    Jeovany CV

    3 people found this answer helpful.
    0 comments No comments
  2. Vijay A. Verma 104.7K Reputation points Volunteer Moderator
    2019-05-07T03:27:57+00:00

    Hi faycal_vba

    Greetings! I am Vijay, an Independent Advisor. I am here to work with you on this problem.

    1. Make a backup of your workbook.
    2. Open your workbook and ALT+F11
    3. Locate your Workbook name in Project Explorer Window
    4. Double click on ThisWorkbook
    5. Copy paste the Macro code given below
    6. Save your file as .xlsm

    Sample File @ https://1drv.ms/x/s!Akd5y6ruJhvhm06Fq8gQCch9zS2C?e=fxUt6y

    Private Sub Workbook_Open()
        Range("A1").Select
    End Sub
    Private Sub Workbook_SheetActivate(ByVal Ws As Object)
        Ws.Range("A1").Select
    End Sub
    

    Please report back me the results so that I can advise further steps if your problem is not solved.

    6 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2019-05-09T00:55:50+00:00

    Hi Jeovany,

    thanks a lot for your explanation.

    I think it will work.

    I have the same code but I only applied to on the sheet so will do for the entire workbook.

    Best,

    Faycal

    0 comments No comments
  4. Anonymous
    2019-05-09T00:56:23+00:00

    Thanks a lot for your help Vijay.

    It works.

    1 person found this answer helpful.
    0 comments No comments
  5. Vijay A. Verma 104.7K Reputation points Volunteer Moderator
    2019-05-09T03:52:51+00:00

    Great! I am glad that worked! If you don't have any more questions, feel free to choose a rating and have a great day!

    0 comments No comments