1

I have some VBa which I run quite often. To make my life easier, I've added a new group to the ribbon and added a "button". I did this by clicking File -> Options and then Customise Ribbon. From the choose commands from I chose Macro and in the list was my macro. This is what I dragged into the new group in the ribbon

enter image description here

When I click on the button, it does what I expect.

The problem occurs when attempt this on a new workbook. If I close all Excel and open a new Excel instance I can see the new Custom Features in the ribbon. When I click on the button it fails with the following message

Cannot run the macro 'Book1!PasteFromWebsite'. The macro may not be available in this workbook or all macros may be disabled

I understand the error message but not how I can fix it or assign the macro to the button so this becomes always available on all Excel instances.

5
  • where is your macro located? It should be in a workbook which opens automatically with Excel. Feb 27, 2017 at 12:39
  • The macro appears to only exist in the workbook where it was created @MátéJuhász . if this is not expected, I can try it again Feb 27, 2017 at 12:43
  • yes, it exists only in the workbook where it's created, however if that workbook is open, then you can call it from any other open workbook. Feb 27, 2017 at 12:45
  • @MátéJuhász, does that mean the functionality I'm after doesn't exist (using VBa)? Feb 27, 2017 at 12:47
  • 1
    Try to use Store Common Macros in the Personal Macro Workbook <excelribbon.tips.net/…>
    – yass
    Feb 27, 2017 at 12:50

0

You must log in to answer this question.

Browse other questions tagged .