PC Review


Reply
Thread Tools Rate Thread

custom menus in excel

 
 
siansun
Guest
Posts: n/a
 
      27th Aug 2009
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 With Quote
 
 
 
 
Chip Pearson
Guest
Posts: n/a
 
      27th Aug 2009

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
<(E-Mail Removed)> 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 With Quote
 
Otto Moehrbach
Guest
Posts: n/a
 
      27th Aug 2009
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" <(E-Mail Removed)> wrote in message
news:17451AAF-469B-4330-B436-(E-Mail Removed)...
>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 With Quote
 
siansun
Guest
Posts: n/a
 
      27th Aug 2009
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
> <(E-Mail Removed)> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you set up custom menus in Excel 2007? KRiffe Microsoft Excel Programming 1 12th Jan 2008 05:39 PM
Custom Menus With Excel 2007 =?Utf-8?B?TWlrZSBILg==?= Microsoft Excel Programming 1 13th Nov 2007 12:45 AM
Adding custom menus to Excel ???? JoeJoe Microsoft Excel Programming 2 30th Oct 2006 09:45 PM
Excel & Custom Menus Stuart Microsoft Excel Programming 2 23rd Dec 2003 02:28 PM
Excel.xlb and Custom Menus Taher Baderkhan Microsoft Excel Programming 2 10th Oct 2003 06:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:31 AM.