Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove the filename when assign a macro to a menu command.

When i assign a macro to the menu command's button. it always shows the macro
name with the filename of workbook. ex: C:\My Project\MyFile0712.xls!macro1

How do I remove the filename name or the path name?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove the filename when assign a macro to a menu command.

You don't. The button has to be linked to a specific instance of the macro.

If you mean how do you change it to point to another workbook, you would use
the onaction property of the button.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
When i assign a macro to the menu command's button. it always shows the

macro
name with the filename of workbook. ex: C:\My

Project\MyFile0712.xls!macro1

How do I remove the filename name or the path name?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove the filename when assign a macro to a menu command.

Hi, Tom. Thanks for your help.

What i need is assign the macro always to thisworkbook (the workbook contain
the macro), no matter what filename it changed to. Does it possible?



"Tom Ogilvy" wrote:

You don't. The button has to be linked to a specific instance of the macro.

If you mean how do you change it to point to another workbook, you would use
the onaction property of the button.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
When i assign a macro to the menu command's button. it always shows the

macro
name with the filename of workbook. ex: C:\My

Project\MyFile0712.xls!macro1

How do I remove the filename name or the path name?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove the filename when assign a macro to a menu command.

Reassign it in the Workbook_Open event using the OnAction property.

No built in support for what you describe. You have to do it with code.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
Hi, Tom. Thanks for your help.

What i need is assign the macro always to thisworkbook (the workbook

contain
the macro), no matter what filename it changed to. Does it possible?



"Tom Ogilvy" wrote:

You don't. The button has to be linked to a specific instance of the

macro.

If you mean how do you change it to point to another workbook, you would

use
the onaction property of the button.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
When i assign a macro to the menu command's button. it always shows

the
macro
name with the filename of workbook. ex: C:\My

Project\MyFile0712.xls!macro1

How do I remove the filename name or the path name?






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Remove the filename when assign a macro to a menu command.

so... if i don't write any code in the Workbook_Open event. i must put the
workbook file on the same path folder with mine?

Oooop! i create a workbook and want to distribute to 10 users, i must create
the same folder on every machine.... :~~

"Tom Ogilvy" wrote:

Reassign it in the Workbook_Open event using the OnAction property.

No built in support for what you describe. You have to do it with code.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
Hi, Tom. Thanks for your help.

What i need is assign the macro always to thisworkbook (the workbook

contain
the macro), no matter what filename it changed to. Does it possible?



"Tom Ogilvy" wrote:

You don't. The button has to be linked to a specific instance of the

macro.

If you mean how do you change it to point to another workbook, you would

use
the onaction property of the button.

--
Regards,
Tom Ogilvy

"OKLover" wrote in message
...
When i assign a macro to the menu command's button. it always shows

the
macro
name with the filename of workbook. ex: C:\My
Project\MyFile0712.xls!macro1

How do I remove the filename name or the path name?







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
macro does not assign to menu? Robert24 Excel Discussion (Misc queries) 2 October 2nd 08 04:39 AM
I can't find the Assign Macro command Dave Excel Discussion (Misc queries) 3 September 27th 06 07:08 PM
Assign a macro to a command button SheriTingle Excel Discussion (Misc queries) 4 September 25th 06 06:38 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
canot remove command from FILE MENU EXCEL CUstomization Excel Discussion (Misc queries) 2 December 7th 04 01:10 AM


All times are GMT +1. The time now is 12:48 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"