Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I use this code and it's work

Sub Check_folder_name()

Dim FileName As String

FileName = Dir("Pathname\folder name")

If FileName = vbNullString Then
    MsgBox "File does not exist."
Else
    MsgBox FileName
End If

End Sub

I use this code and it's work

Sub Check_folder_name()

Dim FileName FolderName As String

FileName FolderName = Dir("Pathname\folder name")

If FileName FolderName = vbNullString Then
    MsgBox "File "Folder does not exist."
Else
    MsgBox FileName
FolderName
End If

End Sub

I use this code and it's work

Sub Check_folder_name()

Check_folder_name()

Dim FolderName As String

Stringenter
 FolderName = Dir("Pathname\folder name")

 If FolderName = vbNullString Then
     MsgBox "Folder does not exist."
 Else
     MsgBox FolderName
 End If

End Sub

End Sub