+ Reply to Thread
Results 1 to 5 of 5

Concurrent Workbook Menu Generation.

Hybrid View

gajendra.gupta Concurrent Workbook Menu... 02-16-2007, 12:23 AM
Leith Ross Hello Gajendra.gupta, Your... 02-16-2007, 04:01 AM
gajendra.gupta Leith, Thanks for your reply... 02-16-2007, 05:50 AM
gajendra.gupta Any comments? Regards,... 02-19-2007, 12:54 AM
gajendra.gupta Concurrent Workbook Menu... 02-20-2007, 05:25 AM
  1. #1
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66

    Concurrent Workbook Menu Generation.

    Hi,

    I am creating and destroying some Menus in a particular workbook through some VBA code and that code I have written in the Auto_Open and Auto_Close. My problem is when apart from this workbook when I open another Excel Workbook the same menus gets created in it which I do not want. Any clues why it is happening and how can I prevent it?

    Regards,
    Gajendra Gupta

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Gajendra.gupta,

    Your menus are part of the Excel application object and not the workbook object. You need to remove the menus you have added before you open the new workbook. Place the code to remove the menus in the Workbook_BeforeClose event.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66
    Leith, Thanks for your reply but it does not work. May be I did not ask my problem properly so let me explain it again.

    I am building some Excel Application in which I am creating some Menus as well as some toolbars. For this purpose I have written different subroutines for creating and detroying Menus and Toolbars. For creating them I am calling these subroutines in my Auto_Open and to detroy them I am destroying them in Auto_Close. My problem is If I have any other workbook opened along with my Macro Workbook or if I open another one, the menus gets created for that workbook.

    Now as you said that I should place that code in Workbook_BeforeClose event, it would not work because that code will fire only if I close that workbook and it will complain that 'Can not execute in break mode'.

    I want these menus and toolbars to be restricted for Macro Workbook only.

    Regards,
    Gajendra Gupta

  4. #4
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66
    Any comments?

    Regards,
    Gajendra Gupta

  5. #5
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66

    Concurrent Workbook Menu Generation.

    Can someone please help me out. I am running on deadlines.

    Regards,
    Gajendra Gupta

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1