![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 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!!!!
|
|
|
|
|
|
#2 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|