View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Creating a folder

Maybe you can just ignore the error if the folder already exists:

on error resume next
mkdir "I:\mybackup"
on error goto 0

dan wrote:

Sub test()
' I want to creat a folder if that folder doesn't exist in the path.
' The following statement is not supported. What is the right way?, Please.

If Not Application.exist("I:\Mybackup\") Then MkDir ("I:\Mybackup\")
End Sub


--

Dave Peterson