Case 2
.Filters.Add “Paradox files”, “*.db”Case 3
.Filters.Add “Lotus 1-2-3 files”, “*.wk3”End Select.InitialView = msoFileDialogViewDetails
.InitialFileName = strPath
If .Show = -1 Then
strAppFile = CStr(fd.SelectedItems.Item(1))
Else
Debug.Print “User pressed Cancel”
End If
End Withtxt.Value = strAppFileSave the value to tblInfo.SaveAppFile (strAppFile)ErrorHandlerExit:
Exit SubErrorHandler:
MsgBox “Error No: “ & Err.Number _
& “; Description: “ & Err.Description
Resume ErrorHandlerExitEnd SubThe “Import File Type” option group’s After_Updateprocedure first checks that the selected
application file is the right type, and clears it if not, then sets up a Select Casestatement to
process the three types of application files differently, calling the SaveTextFileSub:Private Sub fraFileType_AfterUpdate()On Error GoTo ErrorHandlerDim strExt As StringCheck that selected application file is the right type, and clear the file selection if not.intFileType = Nz(Me![fraFileType].Value, 1)If Len(GetTextFile()) > 4 Then
strExt = Right(strAppFile, 3)
End IfPart II Writing VBA Code to Exchange Data between Office Components