Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default custom menus in excel

I have created an excel application with mostly custom menus using vba code.
The problem is that when the application is open, if i try to open a regular
excel file it also opens showing only the custom menus. is there a way to
(programmatically) get around this problem? and would i be able to do this in
vba code for the application containing the custom menus?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default custom menus in excel


In the application workbook, you can use the Activate and Deactivate
events in the ThisWorkbook code module to make the menus hidden when
your workbook is deactivated (user switches to another workbook) and
then restore their visibility when the workbook is activated (user
returns to your workbook).

' In the ThisWorkbook code module:
Private Sub Workbook_Activate()
' code to make menus/commandbars visible
End Sub

Private Sub Workbook_Deactivate()
' code to make menus/commandbars hidden
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Thu, 27 Aug 2009 11:50:02 -0700, siansun
wrote:

I have created an excel application with mostly custom menus using vba code.
The problem is that when the application is open, if i try to open a regular
excel file it also opens showing only the custom menus. is there a way to
(programmatically) get around this problem? and would i be able to do this in
vba code for the application containing the custom menus?

thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default custom menus in excel

Use a Workbook_Activate macro to create the custom menus, and a
Workbook_Deactivate macro to remove the custom menus. That way the custom
menus appear only if that workbook is the active workbook. HTH Otto
"siansun" wrote in message
...
I have created an excel application with mostly custom menus using vba
code.
The problem is that when the application is open, if i try to open a
regular
excel file it also opens showing only the custom menus. is there a way to
(programmatically) get around this problem? and would i be able to do this
in
vba code for the application containing the custom menus?

thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default custom menus in excel

Great! Thanks for the help.

"Chip Pearson" wrote:


In the application workbook, you can use the Activate and Deactivate
events in the ThisWorkbook code module to make the menus hidden when
your workbook is deactivated (user switches to another workbook) and
then restore their visibility when the workbook is activated (user
returns to your workbook).

' In the ThisWorkbook code module:
Private Sub Workbook_Activate()
' code to make menus/commandbars visible
End Sub

Private Sub Workbook_Deactivate()
' code to make menus/commandbars hidden
End Sub


Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



On Thu, 27 Aug 2009 11:50:02 -0700, siansun
wrote:

I have created an excel application with mostly custom menus using vba code.
The problem is that when the application is open, if i try to open a regular
excel file it also opens showing only the custom menus. is there a way to
(programmatically) get around this problem? and would i be able to do this in
vba code for the application containing the custom menus?

thanks


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
Can you set up custom menus in Excel 2007? KRiffe Excel Programming 1 January 12th 08 05:39 PM
Custom Menus With Excel 2007 Mike H. Excel Programming 1 November 13th 07 12:45 AM
Adding custom menus to Excel ???? JoeJoe Excel Programming 2 October 30th 06 09:45 PM
Excel & Custom Menus Stuart[_14_] Excel Programming 2 December 23rd 03 02:28 PM
Excel.xlb and Custom Menus Taher Baderkhan[_2_] Excel Programming 2 October 10th 03 06:38 PM


All times are GMT +1. The time now is 06:32 PM.

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

About Us

"It's about Microsoft Excel"