Tab Click event

Foo_Man_Chu

Board Regular
Joined
Jul 22, 2010
Messages
79
I'm trying to get an event to fire when the current tab is clicked at the bottom of the workbook. I know there's the event that fires when a sheet that is not the active sheet is clicked and thus becomes the active sheet, but I need to have my event fire when you click the tab of the currently active sheet. Any help?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
AFAIK, there is no event that triggers when a sheet's tab is clicked.

What do you want to happen when the user clicks the tab of their current worksheet?
 
Upvote 0
I'm trying to get an event to fire when the current tab is clicked at the bottom of the workbook. I know there's the event that fires when a sheet that is not the active sheet is clicked and thus becomes the active sheet, but I need to have my event fire when you click the tab of the currently active sheet. Any help?
That's not a covered event. What do you want to happen when you click the tab of the active sheet?
 
Upvote 0
It's more of a want than a need. I've got it set up now so when the template sheet becomes the active sheet it makes a copy, renames it and puts it before the template sheet. I just wanted to be able to be on the template sheet and click on the tab and have the same thing happen. Oh well.
 
Last edited:
Upvote 0
You could put a simple sub in your personal workbook, put a button on the Quick Access Toolbar and click it to copy the active sheet.
Code:
Sub MakeCopy()
With ActiveSheet
       .Copy before:=ActiveSheet
       .Name = "Your Name"   'you might want to add an error trap if sheet with this name already exists
End With
End Sub
 
Last edited:
Upvote 0
I'm also thinking that in order to keep a template sheet pure, to keep users from accidentally entering something on it, its common for a template sheet to be VeryHidden, with no tab.

A slight change to JoMoe's code will accommodate that set-up

Code:
With ThisWorkbook.Sheets("Template")
       .Copy before:=ThisWorkbook.Sheets("Template")
       .Name = "Your Name"   'you might want to add an error trap if sheet with this name already exists
End With
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,289
Members
449,149
Latest member
mwdbActuary

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