when sheet is active macro is run

K

kalpesh

Hello

my workbook contain 2 shee

sheet 1 name ("Bill"
sheet 2 name ("Data"

i need a macro when sheet 1 ("Bill") is active to hide menuba
otherwise menu bar is unhid

how it possibel
 
D

Don Guillett

right click sheet tab>view code>insert BOTH of these

Private Sub Worksheet_Activate()
CommandBars("Worksheet Menu Bar").Enabled = False
End Sub
Private Sub Worksheet_Deactivate()
CommandBars("Worksheet Menu Bar").Enabled = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top