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
 
Top