Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default weird saving of a document with macros resulting with macros being transfered to the copy

Hi everybody

I have happened to come accross a knotty problem while saving a workbook
with this the workbook object's SaveAs method.
What I did was to prepare an xls workbook (called Tender.xls ) to open and
access different dbf files to retrieve some data on which to manipulate
within the workbook later.
This is all done through macros called up by a user when they press a menu
button on a toolbar assigned to this document.

All had been going just flawlessly until I hit an idea that it would be
prudent to provide this document with the automatic backup saving
capability: just imagine the user closes the document and the workbook as
it is of each time the data are accessed is written with the time and date.

So I have placed a macro to save a copy of my Tender.xls document with its
name expanded with the current date and time such as "Tender 2005-12-10 time
20-20 .xls". The macro code is called / placed within the
Workbook_BeforeClose event within the Tender.xls workbook.

The trouble all starts when I open the original document later to continue
these data retrieving operations. Now, when I press the buttons assigned to
my macros the macros from within that saved backup copy of let's say "Tender
2005-12-10 time 20-20 .xls" are called and the "Tender 2005-12-10 time 20-20
..xls" is opened instead of the macros from the original "Tender.xls "
workbook.


Is there a way to Save this backup copies and then save the main document so
that macros associations on my tool bar in the main document are preserved
(linking to macros within that document and not to its copies)
?
Gonzales


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
Macros: can you copy macros from one doc to another? Roady Excel Discussion (Misc queries) 1 June 12th 08 05:47 PM
Saving Macros Matt Excel Discussion (Misc queries) 0 June 4th 08 05:46 PM
auto saving transfered data seags Excel Discussion (Misc queries) 2 February 4th 06 12:19 PM
Saving transfered data seags Excel Worksheet Functions 0 January 31st 06 01:21 AM
Saving Macros Gerald Excel Discussion (Misc queries) 1 August 19th 05 02:28 PM


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