Create new directory
Sebastien brings up an interesting point. If the value in C22 is a text
string then use his code to replace the slashes with dashes. If however, as I
had assumed, the value is a date then the replace will not work and my code
will... Depend on what you have...
--
HTH...
Jim Thomlinson
"sebastienm" wrote:
Francis,
you can use the mkdir statement. SOmething like (no tested):
'-----------------------------------
Dim s as string, path as string
path= "C:/Datefile/"
s=ThisWorksbook.sheets("MainPage").Range("C22").Te xt
s = replace(s, "/", "-") ' replace / with dash -
path= path & s ' <------ path string
makdir path
'------------------------------
Regards,
Sébastien
<http://www.ondemandanalysis.com
"Francis Brown" wrote:
Hello.
How to you create a directory named the same as a date stored in a cell.
say sheet MainPage has a date 25/10/2005 in cell C22.
How do you take this and make a Direcotry 22-10-2005 in C:/Datefile folder.
Thanks in advance.
Francis.
|