View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Creating a folder using macro...

s$ = "C:\LOA\" & strProjectNumber
On Error Resume Next
mkdir "C:\LOA\" & strProjectNumber
On Error goto 0
bk.SaveAs FileName:= s$ & "\" & fnames$

should do what you want.

--
Regards,
Tom Ogilvy



"ChrisMattock" wrote:


Thanks, but if the directory exists I just want the files saved in it
rather than it quitting out, and I still don't know how to modify the
path when saving the file to reflect the directory name. I did warn you
I was an idiot. :P


--
ChrisMattock
------------------------------------------------------------------------
ChrisMattock's Profile: http://www.excelforum.com/member.php...o&userid=33912
View this thread: http://www.excelforum.com/showthread...hreadid=545527