ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   when sheet is active macro is run (https://www.excelbanter.com/excel-programming/445366-when-sheet-active-macro-run.html)

kalpesh

when sheet is active macro is run
 
Hello,

my workbook contain 2 sheet

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

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

how it possibel

Don Guillett[_2_]

when sheet is active macro is run
 
right click sheet tabview codeinsert 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



On Feb 12, 11:09*am, kalpesh
wrote:
Hello,

*my workbook contain *2 sheet

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

*i need a macro when sheet *1 ("Bill") is active to hide menubar
*otherwise menu bar is unhide

*how it possibel



kalpesh

when sheet is active macro is run
 
Don Guillett wrote on 02/12/2012 13:51 ET :
right click sheet tabview codeinsert 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



On Feb 12, 11:09



All times are GMT +1. The time now is 10:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com