Macro links to other workbooks

  • Thread starter Thread starter Jim G
  • Start date Start date
J

Jim G

I've exported several macros to be imported into other workbooks when they
are first used.

When a macro is imported it retains the link to the original workbook. How
do I remove the links?

It's likely I'm missing somehting obvious but I'm lost for looking.
 
Not sure without seeing the code, but possibly
thisworkbook.something is the key example
ThisWorkbook.Save
ThisWorkbook.Close
thisworkbook.sheets("Sheet1")
 
Correction: they aren't linked to the original workbook. It's the name of
thisworkbook. When I write a macro that creates the buttons, I can't put
thisworkbook.name in the "OnAction" command.
 
This kind of thing works for me:

..OnAction = "'" & ThisWorkbook.Name & "'!" & "somemacronamehere"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top