Excel template with macros - strange behaviour?

Copper Contributor

 

Excel version 16.0.14827.20158, on Windows 10, using OneDrive for file storage.

 

Workflow:

For each new client we create a new workbook which will become the cutlist for our CNC machine.

 

I have an Excel template (.xltm) that contains a few macros. The macros are displayed to the user in a custom Ribbon tab. Upon use of a macro within the new workbook (.xlsm) created from the template, the template itself is opened in the background.

 

I can't figure out how to tell Excel to reassign ownership/connection/relationship of the macros to the newly created .xlsm.

 

Eg:

1.) I create a new workbook by clicking the template. I immediately save it as  'CLIENTNAME.xlsm'. The only workbook open is the current one, and the template is not open.

 

2.) After entering information and preparing the cutlist, I then use a macro to distill the main sheet and create a new sheet for use with pour CNC machine.  When I click on any macro shown in the Macro tab of the ribbon to run it, the template immediately opens in the background but does not take focus.

 

Please help me make the macros part of the new file and not make the template open?

4 Replies
Hi drew,
thanks for asking your query, i request you to add on the version of excel please!!
could you please tell us too, what steps you took to resolve it? for those who are into same trouble in future .
thanks

@harshulz-

Sorry for the delay. Long weekend here in NZ.

I renamed the macros, to no effect.

Then I started googling - but I get a million google hits, none of which are my problem .

So, I have not done much because I don't even know what governs this behaviour.