Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Excel Start-Up Macro

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Help!!! I'm trying something that's probably easy but I don't know the secret. I want to insert a start-up macro in an Excel 2000 worksheet that has multiple tabs. All I want the macro to do is automatically position the cursor in a specific cell on a specified tab (e.g., Cell A1 of Tab1). I know how to "record" macros but don't know Visual Basic. If I "record" the macro, how can I make it run each time the worksheet is opened? Thanks for any help you can give me!!!!

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Pat


    Right click on the sheet name tab and select "View Code", now paste is this code:

    Private Sub Worksheet_Activate()
    Application.Goto Range("A1"), True
    End Sub

    OR, if you want it to go to a specied cell on sheet 1 whenever the Workbooks opens:


    Right click on the Excel icon, top left next to "File" and select "View Code", paste in this code:

    Private Sub Workbook_Open()
    Application.Goto Sheets(1).Range("A1"), True
    End Sub




Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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