Enable toolbar button in one specific worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have a five-worksheet excel book and I need to disable a button in a
custom toolbar if the user is not in one specific worksheet. I know how to
disable the button but I can't figure out how to trigger the event when the
user switches worksheets.

any ideas?

Thanks
 
Private Sub Worksheet_Activate()
'your code
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.
 
Back
Top