View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
EAHRENS
 
Posts: n/a
Default Need help modifying a macro

Can they be set up so they keep the same name but just add copy2 copy3 etc to
the end of the name?

"David McRitchie" wrote:

Hi Eric,
Didn't realize that code without the quotes was from me,


Renaming sheets within a macro is going to be problematic.
You could intercept the error and try again, or ignore it keeping the
name assigned by Excel and manually change it later.

Possibly you could name your sheets
so that they are guaranteed to be unique with a
date and timestamp format yyyy-mm-dd-mmss
http://www.mvps.org/dmcritchie/excel/backup.htm
http://www.mvps.org/dmcritchie/excel/sheets.htm

HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"EAHRENS" wrote in message ...
You are a genius. Thanks for your patience. I would like to bother you for
one more thing. The macro will now create a second page as needed. If I
then try to create an additional (page 3 or more) copy, I get an error
message about duplicate names although the duplicates are created. The
application I am using this for can require numerous copies of these forms.
How can I get around the duplicate name message?

"David McRitchie" wrote:

You need the range addresses within double quotes.
Range("D29:d46").
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"EAHRENS" wrote in message news:46FF8DDC-9AEA-43E2-BCB0-

Range(D29:d46).SpecialCells(xlConstants).ClearCont ents