View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Adding a folder with code

On Error Resume Next
mkdir "C:\MyFolder"
On Error goto 0

this assumes the existence of only the last folder in the chain is in
question.

--
Regards,
Tom Ogilvy


"Tyrell" wrote in message
...
How do I create a folder, if one does not exist, using VBA in Excel when

the
workbook is opened and not create a folder if the specified folder already
exists?
--
Tyrell Fickenscher
Plant Manager / Agronomist