Hi All,
Below is some code I am using to check that a selected DB is the appropriate DB to import a data table. I use a public function PromptFileName() to select the DB and the path of where it may be sitting, which could be any where a user saves it. I want the selection to be checked before it proceeds with the rest of my code.
Therefore strFileName must equal *(Some Path)*\Schedule_Update.mdb
The path is irrelevant but the file name is crucial. I have tried putting in Wild cards *.* in place of the path preceeding the file name without any luck.
Dim strFileName
strFileName = PromptFileName()
If strFileName <> "*.*\Schedule_Update.mdb" Then
MsgBox "This is the Incorrect File"
Exit Sub
End If
Any help would be great.
Thanks
Curry
Below is some code I am using to check that a selected DB is the appropriate DB to import a data table. I use a public function PromptFileName() to select the DB and the path of where it may be sitting, which could be any where a user saves it. I want the selection to be checked before it proceeds with the rest of my code.
Therefore strFileName must equal *(Some Path)*\Schedule_Update.mdb
The path is irrelevant but the file name is crucial. I have tried putting in Wild cards *.* in place of the path preceeding the file name without any luck.
Dim strFileName
strFileName = PromptFileName()
If strFileName <> "*.*\Schedule_Update.mdb" Then
MsgBox "This is the Incorrect File"
Exit Sub
End If
Any help would be great.
Thanks
Curry