+ Reply to Thread
Results 1 to 5 of 5

Creating two menus

  1. #1
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    Creating two menus

    I have a workbook which uses the code below to create a new menu upon opening. I have now used this same code in a second workbook to create a different menu. both work OK on their own However if by chance both workbooks are opened at the same time only one menu is shown.
    Is there a way I can change one of these to create a second menu if the first one is already there?

    Please Login or Register  to view this content.
    Last edited by tryer; 10-12-2009 at 10:16 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Creating two menus

    what about since the menus have the same name add
    Please Login or Register  to view this content.
    to each workbook
    then the subs will only work for the open work book
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    Re: Creating two menus

    Thanks for the reply Pike. The thing is I need to be able to have both menu's available if both workbooks are open. However your comments have made me think about names, and I realise that the createmenu sub was named the same in both workbooks so I have cheanged one of them but unfotunately it hasn't cured the problem. When I open the second workbook the first menu is overwritten.

    Any further thoughts?

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Creating two menus

    You need to give the menus a different Tag value.

    This part removes a menu with the tag "MyTag" in your case they both have the same tag.

    Please Login or Register  to view this content.
    Don't forget to also change the tag when creating the menu.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Valued Forum Contributor
    Join Date
    11-16-2004
    Location
    Devon UK
    MS-Off Ver
    2010
    Posts
    357

    Re: Creating two menus

    Brilliant !!

    Thank you Andy that solved it

+ 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