Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"The macro 'GWXL97.XLACloseMacro' cannot be found." CDC77 Excel Discussion (Misc queries) 1 August 25th 09 08:46 PM
"No RETURN() or HALT() function found on macro sheet." Will Excel Worksheet Functions 2 January 4th 07 10:10 PM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"