Hi
I would like to add a code, so that when the excel workbook is saved and closed it still re-opens to sheet 1, even if it is last saved on sheet 2 in excel 2007
Is anyone able to help?
Hi
I would like to add a code, so that when the excel workbook is saved and closed it still re-opens to sheet 1, even if it is last saved on sheet 2 in excel 2007
Is anyone able to help?
JennaL,
Welcome to the Excel Forum.
You can use the Workbook_Open Event.
Open the workbook in question.
Please TEST this FIRST in a COPY of your workbook (always make a backup copy before trying new code, you never know what you might lose).
1. Copy the below code, by highlighting the macro code and pressing the keys CTRL + C
2. Open your workbook
3. Press the keys ALT + F11 to open the Visual Basic Editor
4. And, paste the copied code into VBAProject, Microsoft Excel Objects, ThisWorkbook (on the right pane) by pressing the keys CTRL + V
5. Press the keys ALT + Q to exit the Editor, and return to Excel
![]()
Please Login or Register to view this content.
Then save the workbook with Sheet2 as the active sheet.
Then open the workbook again, and the code will automatically activate Sheet1.
Have a great day,
Stan
Windows 10, Excel 2007, on a PC.
If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
I've changed the title for you this time to show you a better alternative.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks