Macro experts assem...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Macro experts assemble!

3 Posts
4 Users
0 Reactions
103 Views
Posts: 1103
Free Member
Topic starter
 

I've created five macros to automate formatting tasks in five monthly Excel files then saved these to my toolbar for future use.

However I keep getting the following error message when trying to use them in subsequent spreadsheets:

'Cannot run the macro 'PERSONAL.XLSB!NameOfFile'. The macro may not be available in this workbook or all macros may be disabled.'

Any ideas?

Thanks


 
Posted : 02/12/2021 11:29 am
Posts: 3131
Free Member
 

You need to save these macros in a macro-enabled workbook and have that workbook open.

(Yes it is not intuitive and I don't fully understand it but this is my workaround).


 
Posted : 02/12/2021 11:32 am
Posts: 4315
Full Member
 

Thought this was going to be about photography.


 
Posted : 02/12/2021 12:31 pm
Posts: 13594
Free Member
 

Yes it is not intuitive and I don’t fully understand it but this is my workaround

VBA Macros only exist in Excel workbooks. Once you close all your workbooks, any Macros have been removed.

Excel has a fix for this, it has a Personal.xls workbook you can store macros in..

https://www.ablebits.com/office-addins-blog/2020/03/04/excel-personal-macro-workbook/

However, that WB will be personal to you, so send your project WB to a colleague and it's got not macros in it.

Personally, I just add all the macros I want to use into each project workbook (very easy to do, you can just export the relevant VBA module and import it into another workbook in a few mouse clicks).


 
Posted : 02/12/2021 7:27 pm

6 DAYS LEFT
We are currently at 95% of our target!