I found a useful function on-line that I use in my application.
Public Function ListFiles(strPath As String, Optional strFileSpec As String, Optional bIncludeSubfolders As Boolean)
A typical usage is...
Call ListFiles("E:\ARCHIVE_130822\CompletedTables__ARCHIVE", "Group_?_WorkCode_?????.mdb", True)
The function works perfectly (there's no need to list the actual function here). In the line above, E is an external hard drive.
My problem is that if this external hard drive is NOT connected, I get no error. What code would give me a msgbox if the drive is not connected?
thanks in advance
Public Function ListFiles(strPath As String, Optional strFileSpec As String, Optional bIncludeSubfolders As Boolean)
A typical usage is...
Call ListFiles("E:\ARCHIVE_130822\CompletedTables__ARCHIVE", "Group_?_WorkCode_?????.mdb", True)
The function works perfectly (there's no need to list the actual function here). In the line above, E is an external hard drive.
My problem is that if this external hard drive is NOT connected, I get no error. What code would give me a msgbox if the drive is not connected?
thanks in advance