View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Test for Folder Path. if it doesn't exist, Create it

Z: is always there?

on error resume next
mkdir "Z:\foldername"
on error goto 0

If it's there, the mkdir will fail, but who cares???
If it's not there, then the mkdir will create it.



Barb Reinhardt wrote:

I'd like to test for a folder path (Z:\FolderName) and if it doesn't exist,
I'd like to create it. Can someone provide a snippet of code on how to do
this?

Thanks,
Barb Reinhardt


--

Dave Peterson