Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,522
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for active sheet only Victor Delta[_2_] Excel Discussion (Misc queries) 4 October 21st 09 08:37 PM
macro active sheet liem Excel Discussion (Misc queries) 1 January 18th 08 05:48 AM
ow can I get the active sheet name to a var in a macro?? italo Excel Programming 1 May 16th 06 10:36 PM
Copy from active sheet and paste into new sheet using info from cell in active Ingve Excel Programming 3 January 23rd 06 09:57 PM
macro only in active sheet jobra Excel Programming 5 August 23rd 05 04:00 PM


All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"