Launch Script When Tab Is Opened

ExcelAtEverything

Active Member
Joined
Jan 30, 2021
Messages
351
Office Version
  1. 2019
Platform
  1. Windows
Hello all!

Is there a way to launch a script or message every time a particular tab (DATA1) is selected/opened? I know it can be done when opening a workbook, but I need it to occur when opening a tab. What I'm trying to do is to create a "warning" sort of message each time the database tab (DATA1) is opened. If the person runs were to open that particular tab and just start pressing the buttons (which run macros) without doing it in the correct order, it could break the sheet by disorganizing the table I have on the main (RANKER) sheet. On the other hand I can't lock or hide it because they will need to use it periodically (when a new store comes online & opens).

Thanks!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Why is this a sticky?
It is my mistake. Thanks for the heads-up.

Last night I received an urgent email from the OP requesting sensitive data removal, and I was on the phone at the time. So, I didn't realize that I accidentally clicked on the button while I was trying to remove the content.

Sorry for the confusion.
 
Upvote 0
Last night I received an urgent email from the OP requesting sensitive data removal, and I was on the phone at the time. So, I didn't realize that I accidentally clicked on the button while I was trying to remove the content.
Actually a bit more than this.

As a super unbelievable coincidence right at that moment, the host network company experienced a short outage that I needed to switch my attention immediately. Then, as you would guess, I didn't even notice that I made this thread the most famous one for 12 hours :)

Thanks again for the heads-up.
 
Upvote 0
a couple of more questions
Rich (BB code):
- It needs to only insert 1 row at the bottom of each range on the MOR sheet.
...why if there are more than 1 new store to be entered ?
Rich (BB code):
- It needs to insert a row at the bottom of the range on the "Store Data" sheet.
..don't you already have a table setup on the store data sheet.
Rich (BB code):
- In the D column of the MOR sheet, it also needs to copy down the "Concatenate" formula from the rest of the D cells above.
again, why....the code concatenates the cells without the need for formulas

Can you upload the wrokbook to DropBox or similar....I don't seem to be reproducing the shatts as you have them set out.
I may be away for a few days, so hopefully somone else can step and refine the code
 
Upvote 0

Forum statistics

Threads
1,216,117
Messages
6,128,935
Members
449,480
Latest member
yesitisasport

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