LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro execution changes filename reference for all macros

Long ago (10 or more years) I created a mailing list application, using Excel
97 originally, with updates along the way using Excel 2000 and 2003. The
application has been running with Excel 2007 for 18 months without a problem.
Everything has worked smoothly until about two weeks ago.

The user clicks on any of a number of control button on a worksheet to call
a series of routines. In the troublesome routine a list is sorted and
filtered. The filtered list is copied to a new sheet. The sheet is renamed.
The sheet is then moved to a new book. The problem occurs when the move
command executes.

The code is:
With ActiveSheet
.Name = "Publication"
.Move
End With

Prior to the execution of that bit of code every button shows the assigned
macro as "Mail List!macroname" (where "Mail List is hte file name); but when
the ".move" command executes the macros assigned to all of the buttons change
to "Book1!macroname" (where Book1 is the name of the new file).
Additionally, if you open the list of macros, all macros now point to Book1
and not to the original file name.

Until now, the application has worked like a charm, with the last major
update in 2004.

What can I do to keep this file name switch from happening?


 
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 reference changes with filename Louis Sweere Excel Discussion (Misc queries) 1 November 7th 07 11:47 AM
Using filename hyperlinks in Macros [email protected] Excel Programming 7 December 20th 06 11:10 PM
Macros - Force execution using workbook_open Guy Normandeau Excel Discussion (Misc queries) 3 July 6th 06 08:29 PM
Reference in a filename.. Frode Hjoennevaag Excel Worksheet Functions 3 April 14th 05 02:47 PM
macros execution problem Lolly[_2_] Excel Programming 1 April 7th 05 02:42 PM


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