Databases Reference
In-Depth Information
MsgBox "PathOnly and FileOnly are Mutually Exclusive",
vbOKOnly + vbCritical, "Function Call Error"
End If
'Set Up Captions and Messages
ErrorBoxCaption$ = "You must choose a File"
filters$ = LCase(filters$)
fillen = Len(filters$)
If fillen Mod 3 = 0 Then
'if valid filters then process
For ii = 1 To fillen Step 3
Search$ = Mid(filters, ii, 3)
'Stop
GoSub Build_Filters
Next ii
End If
'Add default
FileFilter = FileFilter & "All Files (*.*),*.*,"
'remove trailing ','
FileFilter = Left$(FileFilter, Len(FileFilter) - 1)
'If the passes default directory is valid change the current
directory to it
If DirectoryExists(defaultdir$) = True Then
ChDir defaultdir$
End If
Try_Again:
vFileName = Application.GetOpenFilename(FileFilter, ,
WindowCaption$)
'Bug - Tries to Open "False.xls" on 2nd Pass Only
If vFileName = "False" Then GoTo FileOpenErr
If vFileName <> "" Then
'File Name Captured with DialogBox
If PathOnly = True Then
GetFileInfo = Extract_Path(vFileName)
Exit Function
ElseIf FileOnly = False Then
GetFileInfo = vFileName
Exit Function
End If
If FileOnly = True Then
GetFileInfo = Extract_File(vFileName)
Exit Function
ElseIf PathOnly = False Then
GetFileInfo = vFileName
Exit Function
Search WWH ::




Custom Search