View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Creating a folder using macro...

On Error Resume Next
mkdir "C:\LOA\" & strProjectNumber
On Error Goto 0

--
HTH

Bob Phillips

(replace somewhere in email address with googlemail if mailing direct)

"colofnature"
wrote in message
...

No worries! Your code needs to be

if dir("C:\LOA\" & strProjectNumber,vbdirectory) = "" then mkdir
"C:\LOA\" & strProjectNumber
bk.SaveAs FileName:="C:\LOA\" & strProjectNumber & "\" & fnames$


Sorted!


--
colofnature
------------------------------------------------------------------------
colofnature's Profile:

http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=545527