+ Reply to Thread
Results 1 to 4 of 4

Macros in Ribbon error

  1. #1
    Registered User
    Join Date
    07-17-2017
    Location
    Boston, MA
    MS-Off Ver
    365
    Posts
    55

    Macros in Ribbon error

    I have some macros in a custom ribbon tab and it seems that excel takes the location of those macros based on the current directory location of the file. So if I were to move the file to a different folder, it cannot locate the macro and it breaks. Is there any way around this?

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,673

    Re: Macros in Ribbon error

    One way around it is to put the macros in a different file that will always be in the same place. I keep my ribbon macros in PERSONAL.xlsb. Another option is to create an add-in from the file containing your macros, although you would have to repeat that process every time the macros change.

    But there is no way to move a file and automatically have the Ribbon button find the macro in the new location.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    07-17-2017
    Location
    Boston, MA
    MS-Off Ver
    365
    Posts
    55

    Re: Macros in Ribbon error

    I solved the problem and there actually is a way. You can export customizations, and in that file, change all the places with Location\MacroName to MacroName and then import it again. Works well for me.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2411
    Posts
    26,673

    Re: Macros in Ribbon error

    Glad you found a way that works for you. The customizations file is an XML file that you can edit but it's not really intended for human consumption so you have to be careful.

+ 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. Macros on Ribbon
    By dougman824 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-10-2017, 11:16 AM
  2. [SOLVED] 'Automation error' if run by 'Macros' button at ribbon
    By Ljung in forum Excel General
    Replies: 2
    Last Post: 04-18-2016, 08:52 PM
  3. Macros - Icon on a Ribbon
    By AlexiAlex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-08-2015, 02:18 AM
  4. Attach macros to top ribbon
    By miles44 in forum Excel General
    Replies: 1
    Last Post: 09-23-2015, 11:11 AM
  5. need to create macros in ribbon
    By clammastak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2015, 06:46 PM
  6. Customizing a ribbon with macros
    By DrNerj in forum Excel General
    Replies: 0
    Last Post: 08-15-2012, 10:15 AM
  7. Using Macros on ComboBox within the Ribbon
    By DougQval in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-10-2009, 03:50 AM

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