How to get macro to run in Excel2007 when the workbook is first opened to take t
ID: 3570588 • Letter: H
Question
How to get macro to run in Excel2007 when the workbook is first opened to take the user to cell A2 of the first sheet
It used to work in an earlier version of Excel using the method below but 2007 does not have the XL Icon.
Right click the XL iicon to the left of the File menu item and select View Code from the popup menu that appears, then copy paste the following into the code window that opened up...
Private Sub Workbook__Open()
Sheets(1).Activate
Range("A2").Select
End Sub
Any help gratefully received..
Thanks !!
Explanation / Answer
Hi...
Press Allt+F11 to activate the Visual Basic Editor..
Double-click ThisWorkbook under Microsoft Excel Objects..
Enter the code in the module that appearss..
Make sure that you save the workbook in a macro-enabled format: .xlsm, .xlsb or .xls, but not .xlsx.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.