+ Reply to Thread
Results 1 to 6 of 6

Getting Custom Addon to Create Menu

  1. #1
    Registered User
    Join Date
    03-14-2014
    Location
    Fleet
    MS-Off Ver
    Excel 2013
    Posts
    22

    Getting Custom Addon to Create Menu

    Hi All

    This is the first time I am trying to write an addon. I have written all the macros and saved it as an addon file. In the target workbook I can see it in the Add Addon's but I cannot see any of the menu items which I created to run the function. Everything seems to work if I copy and paste the code into a blank workbook

    I have attached the source file .xlsm for you to have a look at although I have been saving it as .xlam.

    I am running Office 2010 on Windows 7.

    Any advice would be greatfully appreaciated.

    Thanks
    Steve
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,282

    Re: Getting Custom Addon to Create Menu

    Your code doesn't run automatically when you open the workbook - you need to use the Workbook_Open event in the ThisWorkbook module to make it do that.
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    03-14-2014
    Location
    Fleet
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Getting Custom Addon to Create Menu

    Thanks Rory

    I gave it a try and it works, thanks. Now for the next question...

    In my code I said to give it a main menu item of &Marketplaces and a sub menu item of "Insert Amazon Formula" however, once I insert the AddOn I get a main menu item called "ADD ONS" and a submenu item of "XL Utility Example"

    Any ideas.
    Thanks
    Steve

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,282

    Re: Getting Custom Addon to Create Menu

    The code you have is the old style commandbars code. Using that, you can only put your buttons onto the Add-ins tab. If you want more control, you have to use XML in the CustomUI part of the workbook (it's really not as bad as it sounds!).
    Ron's site is one of the best to get started: http://www.rondebruin.nl/win/section2.htm
    Andy also has a Ribbon editing add-in here: http://www.andypope.info/vba/ribboneditor_2010.htm

  5. #5
    Registered User
    Join Date
    03-14-2014
    Location
    Fleet
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Getting Custom Addon to Create Menu

    Thanks - Works like a charm. Just cant get it working on 2007 for some reason but this is not the end of the world.

    Thanks again
    Steve

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,282

    Re: Getting Custom Addon to Create Menu

    Did you create a CustomUI14 part? That's only for 2010 and later; you need CustomUI to include 2007 too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 01-15-2013, 08:18 PM
  2. Replies: 2
    Last Post: 01-18-2008, 11:45 AM
  3. create custom menu with addin connect/disconnect
    By dayanand108 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2005, 09:05 AM
  4. Create/Remove Custom Menu Items from Add-in
    By Michael Malinsky in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-27-2005, 02:04 AM
  5. Auto Create Custom Menu Buttons
    By Shaker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2005, 06:45 PM

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