The Macro "C:\Test\Something.xls!Macro" could not be found

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I guess this is somewhat a silly question, but I'm not able to figure it out.
I have made a macro, and I have assigned it to a button in the toolbar. But
when moving the Excel file to a different location, it can not find the
macro. How do I make it work wherever I put move the xls file?

Regards
OTS
 
Thank you.
Does this mean that the I have to ship the xla file along with the xls that
are going to use the macros from a toolbar?
I also use a DataObject in my original workbook module. The purpose of this
is to be able to but a string onto the clipboard. But it seems that the
DataObject isn't available in the addin module. Is there any other way to
copy something to the clipboard?

Regards
OTS
 
The code can be part of that .xls file that you share. It doesn't need to be a
..xla.

But if you're sharing multiple workbooks with the same code, you may find your
life easier if you remove all the code from the individual workbooks and create
a single addin.

If you want to use DataObject, then make sure that any workbook that uses it has
a reference to Microsoft Forms 2.0 Object Library. (Under Tools|References in
the VBE while your project is active.)
 
Great!
I'll give it a try.

---
OTS

Dave Peterson said:
The code can be part of that .xls file that you share. It doesn't need to be a
..xla.

But if you're sharing multiple workbooks with the same code, you may find your
life easier if you remove all the code from the individual workbooks and create
a single addin.

If you want to use DataObject, then make sure that any workbook that uses it has
a reference to Microsoft Forms 2.0 Object Library. (Under Tools|References in
the VBE while your project is active.)
 

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