' Add Reference to Microsoft Scripting Runtime
Sub CheckFolderExist()
Dim MyFSO As FileSystemObject
Set MyFSO = New FileSystemObject
If MyFSO.FolderExists("C:\VBAUSEFULCODES\TESTFOLDER") Then
MsgBox "The Folder Exists"
Else
MsgBox "The Folder Does Not Exist"
End If
End Sub
Sub CheckFileExist()
Dim MyFSO As FileSystemObject
Set MyFSO = New FileSystemObject
If MyFSO.FileExists("C:\VBAUSEFULCODES\TESTFOLDER\Test.xlsx") Then
MsgBox "The File Exists"
Else
MsgBox "The File Does Not Exist"
End If
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts