ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   The Macro "C:\Test\Something.xls!Macro" could not be found (https://www.excelbanter.com/excel-programming/389427-macro-c-%5Ctest%5Csomething-xls-macro-could-not-found.html)

OTS[_2_]

The Macro "C:\Test\Something.xls!Macro" could not be found
 
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

Dave Peterson

The Macro "C:\Test\Something.xls!Macro" could not be found
 
Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

OTS wrote:

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


--

Dave Peterson

Dave Peterson

The Macro "C:\Test\Something.xls!Macro" could not be found
 
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.)

OTS wrote:

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

"Dave Peterson" wrote:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

OTS wrote:

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


--

Dave Peterson


--

Dave Peterson

OTS[_2_]

The Macro "C:\Test\Something.xls!Macro" could not be found
 
Great!
I'll give it a try.

---
OTS

"Dave Peterson" wrote:

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

OTS wrote:

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

"Dave Peterson" wrote:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm

Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)

OTS wrote:

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

--

Dave Peterson


--

Dave Peterson



All times are GMT +1. The time now is 06:25 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com