Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Commandbutton

Ladies and Gentlemen,

I have a macro button that is installed when the my
workbook opens. Click on the button and viola, the macro
executes.

I would like to have this macro reside in my
personal.xls file. Therefore, I copied it over and closed
the original workbook. However, when I click the button,
the first workbook, which is now closed, opens and the
code executes on that workbook. How would I make the
button run "macro1" no matter which workbook is open I
want it to find the first and only occurance of macro1
among the open workbook(s) and execute that one?

Thanks in advance,

David Fixemer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Commandbutton

Is there a hard coded file directory path in your macro coding? If so, change it to the correct path for the second file.


----- David Fixemer wrote: ----

Ladies and Gentlemen

I have a macro button that is installed when the my
workbook opens. Click on the button and viola, the macro
executes

I would like to have this macro reside in my
personal.xls file. Therefore, I copied it over and closed
the original workbook. However, when I click the button,
the first workbook, which is now closed, opens and the
code executes on that workbook. How would I make the
button run "macro1" no matter which workbook is open I
want it to find the first and only occurance of macro1
among the open workbook(s) and execute that one

Thanks in advance

David Fixeme

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Commandbutton

David,

Is the button being installed on that workbook only, and is it destroyed
when that WB is closed?

The button probably still points at the old WB, so you will need to add
installation code to Personal.xls, but be sure to make it a temporary
control
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"David Fixemer" wrote in message
...
Ladies and Gentlemen,

I have a macro button that is installed when the my
workbook opens. Click on the button and viola, the macro
executes.

I would like to have this macro reside in my
personal.xls file. Therefore, I copied it over and closed
the original workbook. However, when I click the button,
the first workbook, which is now closed, opens and the
code executes on that workbook. How would I make the
button run "macro1" no matter which workbook is open I
want it to find the first and only occurance of macro1
among the open workbook(s) and execute that one?

Thanks in advance,

David Fixemer



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
Floating a CommandButton Ayo Excel Discussion (Misc queries) 2 June 2nd 08 08:08 PM
Hide commandbutton? capt Excel Discussion (Misc queries) 2 February 21st 08 07:40 PM
Remove CommandButton SS[_3_] Excel Programming 1 February 3rd 04 11:32 PM
Macro won't run from CommandButton Nathan Gutman Excel Programming 3 December 24th 03 07:59 PM
CommandButton.Caption Bob Phillips[_5_] Excel Programming 0 September 8th 03 08:15 AM


All times are GMT +1. The time now is 04:42 AM.

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"