Savecopyas saves a copy of the workbook using a new name.
The original file is still there and hasn't been saved/renamed to the new name.
It sure sounds like you really want
copy|paste special|values
..saveas (that new name)
and reopen the template workbook
(and maybe close the .saveas workbook, too??)
taylorm wrote:
Someone in my area created a macro a couple of years ago that did the
following:
1) Copy / Paste Special Values the selected ranges in the worksheet
2) SaveCopyAs a new, predetermined file name (with the hard-coded
values)
3) Reopen original template worksheet (with the formulas in tact)
This worksheet hasn't been used since July of 2005 and now we're trying
to use it again, but we're experiencing a problem with the macro. When
it gets to the step where its to reopen the original file, we get the
following error:
"Run-time error '1004': A document with the name 'filename.xls' is
already open. You cannot open two documents with the same name, even
if the documents are in different folders." etc.
One item to note is that we have migrated to Microsoft Office XP since
this file was used last July. And the person who wrote the macro (and
the end user) swears that it worked before. I can't find anything that
suggests any change in the SaveCopyAs command between Excel 97 and Excel
2002. Can anybody shed any light or suggest a better method?
--
taylorm
------------------------------------------------------------------------
taylorm's Profile: http://www.excelforum.com/member.php...o&userid=28892
View this thread: http://www.excelforum.com/showthread...hreadid=524999
--
Dave Peterson