Macro links to other workbooks

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.
 
Joined
Nov 19, 2006
Messages
23
Reaction score
0
Not sure without seeing the code, but possibly
thisworkbook.something is the key example
ThisWorkbook.Save
ThisWorkbook.Close
thisworkbook.sheets("Sheet1")
 
J

Jim G

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.
 
D

Dave Peterson

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

Top