Excel Start-Up Macro

Pat_Calif

New Member
Joined
Mar 15, 2002
Messages
1
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!!!!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
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
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,034
Members
448,940
Latest member
mdusw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top