#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,560
Default Assign Macro

Hello all,
I am using a spreadsheet that has macros. I have created custom tool bar
buttons to launch the macros.

When I assign the macro to the button, it specifically assigns the macro by
spreadsheet path and name!macro name

This is causing problems when I share this document with others, for
example, the button is clicked and it tries to open the macro c:\documents
and settings\David\macro1
No one else has that path and file except me.
is it possible to just use the macro1 within the document and not have the
full file name and macro assigned to a button?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 27,285
Default Assign Macro

No. What you must do is have your workbook create the button each time the
workbook is opened and delete it when it is close.

Or at least have the workbook create the button from the location where it
will reside - or use the onaction property of the button to change the link
to the current location.

--
Regards,
Tom Ogilvy


"David" wrote in message
...
Hello all,
I am using a spreadsheet that has macros. I have created custom tool bar
buttons to launch the macros.

When I assign the macro to the button, it specifically assigns the macro
by
spreadsheet path and name!macro name

This is causing problems when I share this document with others, for
example, the button is clicked and it tries to open the macro c:\documents
and settings\David\macro1
No one else has that path and file except me.
is it possible to just use the macro1 within the document and not have the
full file name and macro assigned to a button?



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
how to create a command button, then assign macro to it in excel kshaheen Excel Discussion (Misc queries) 3 June 24th 08 01:03 PM
I can't find the Assign Macro command Dave Excel Discussion (Misc queries) 3 September 27th 06 07:08 PM
Assign macro name to menu command w/o using workbook name Blight_Pete Excel Discussion (Misc queries) 0 August 3rd 06 10:48 PM
assign macro PH NEWS Excel Worksheet Functions 2 February 28th 06 02:17 PM
Macro Help In Excel welshlad Excel Discussion (Misc queries) 14 October 26th 05 02:34 PM


All times are GMT +1. The time now is 12:44 PM.

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

About Us

"It's about Microsoft Excel"