G
Guest
Hi Again. I need VBA code to jump over my transferspreasheet function if I
click cancel instead of open from my open file dialog box logic i got from
you guys.
Private Sub cmdImportAIM_Click()
Dim strFilter As String
Dim strInputFileName As String
Dim age As Date
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
'Need error handling if I cancel open file
DoCmd.TransferSpreadsheet acImport, 8, "tblAIMFund",
strInputFileName, True
End Sub
Also, Do you know how my file open requirements can be a little more
specific if i want only file names that end in " * template.xls"
--
(I can't express enough gratitude to everyone who spends time answering our
questions!)
Thanks,
Matt
(access 2000)
click cancel instead of open from my open file dialog box logic i got from
you guys.
Private Sub cmdImportAIM_Click()
Dim strFilter As String
Dim strInputFileName As String
Dim age As Date
strFilter = ahtAddFilterItem(strFilter, "Excel Files (*.XLS)",
"*.XLS")
strInputFileName = ahtCommonFileOpenSave( _
Filter:=strFilter, OpenFile:=True, _
DialogTitle:="Please select an input file...", _
Flags:=ahtOFN_HIDEREADONLY)
'Need error handling if I cancel open file
DoCmd.TransferSpreadsheet acImport, 8, "tblAIMFund",
strInputFileName, True
End Sub
Also, Do you know how my file open requirements can be a little more
specific if i want only file names that end in " * template.xls"
--
(I can't express enough gratitude to everyone who spends time answering our
questions!)
Thanks,
Matt
(access 2000)