Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
unique file names
hoping someone can help me. I need to find out how to export selecte data from excel, into a new sheet, and then save numerous times, eac time with a unique file name. Anyone know what is the easiest way o doing this? I have macro set up to cut and paste secial data form th template, but as I am new to this, and frankly dumb, i am havin trouble finding help on unique file names. Help is appreciated if available, otherwise insanity looms large!! Thanks in advanc -- Graeme ----------------------------------------------------------------------- Graeme R's Profile: http://www.excelforum.com/member.php...fo&userid=1523 View this thread: http://www.excelforum.com/showthread.php?threadid=26862 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
unique file names
Assuming you want a meaningful name, the usual approach is to include a
time-stamp as the final part of the name, e.g. NewName = "MyWorkbook" & Format$(Now(),"yyyymmddhhmmss") & ".xls" which has a resolution of 1 second. Now, before trying to save with that name, you use the Dir$ function to see if that name as already been used. If so, append a letter to make it NewName = "MyWorkbook" & Format$(Now(),"yyyymmddhhmmss") & "A.xls" And of course you have to see if that name is available, and if not, go to B, etc. Generally you would use a loop at this point. On Tue, 12 Oct 2004 14:40:29 -0500, Graeme R wrote: hoping someone can help me. I need to find out how to export selected data from excel, into a new sheet, and then save numerous times, each time with a unique file name. Anyone know what is the easiest way of doing this? I have macro set up to cut and paste secial data form the template, but as I am new to this, and frankly dumb, i am having trouble finding help on unique file names. Help is appreciated if available, otherwise insanity looms large!! Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Counting Unique Names | Excel Worksheet Functions | |||
Unique Names w/ Conditions | Excel Worksheet Functions | |||
counting unique names - again | Excel Worksheet Functions | |||
Finding unique names--then converting those names to unique number | Excel Discussion (Misc queries) | |||
New Range containing Unique names only | Excel Programming |