VBA change worksheet and save that sheet as active on close

spness

New Member
Joined
Mar 21, 2013
Messages
2
Hello Everyone,

I have spent the better part of two days trying to get this to work and have searched this forum looking for an answer I've seen answers for one or the other but not both and combining the two did not work. Because it is at work when opening a workbook with code everyone has to enable the workbook. I NEED to remind them to do that everytime. So Sheet1 "Welcome" reminds them to click options... and enable. Sheet2 "Data_Entry" is where they enter their data and save. This, of course, makes sheet2 the active sheet on opening again and not sheet 1. Using VBA I have been able to make Welcome the active sheet on close, but on re-open it goes to sheet 2. I've used VBA to make sheet1 active on close and (I thought) auto save it so it is active but still get sheet 2 on open. I can also get VBA to open sheet1 on open BUT only after enable. What I need is when they enter their data, save and close, upon open again it is on sheet 1 before they enable the workbook. Any help would be great.

Thanks in advance and take care,

Shawn
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Hum, it seems tying the change sheet at close and save at close works to automatically bring up sheet1 IF they do not click save after entering their data. So they can open the workbook, read the warning to enable the workbook, click to sheet2, enter their data, click the exit button and not only does their data automatically save but sheet1 will be the active sheet at re-open. I tested this by going to sheet2 and clicking save so it was active. I randomly entered data then clicked close and viola data saved and sheet1 active on reopen. I guess it was there all along. Would still be great if someone knew a way to still do this if someone accidently hits save after entering their data or even make the save button run some dummy procedure. Best, Shawn
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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