Private Sub Workbook_Open()
If Dir("C:\Spelade" ,vbDirectory) < "" Then
Exit Sub
Else
Dim strMyFolder As String
strMyFolder = "C:\Spelade"
MkDir strMyFolder
End If
End Sub
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"dallas " wrote in message
...
I create new Folder.
Private Sub Workbook_Open()
Dim strMyFolder As String
strMyFolder = "C:\Spelade"
MkDir strMyFolder
End Sub
but next time Workbook_Open if Folder "C:\Spelade" exist
I want to Exit Sub
How?
Private Sub Workbook_Open()
If ####Folder "C:\Spelade" exist####
Exit Sub
Else
Dim strMyFolder As String
strMyFolder = "C:\Spelade"
MkDir strMyFolder
End If
End Sub
/dallas
---
Message posted from http://www.ExcelForum.com/