Hello all,
VBA coder newb here. Searched the forums and found a useful function here thread705-760625.
I put this code into a module, not a class module. The control I'm using is in a subform and I have entered the following into the click event procedure:
The file select dialog comes up just fine, but whether I select a file or not, I keep getting a type mismatch error. I modified the code I found in that linked thread to show .xls files only. Any help on what it is I've done wrong?
VBA coder newb here. Searched the forums and found a useful function here thread705-760625.
I put this code into a module, not a class module. The control I'm using is in a subform and I have entered the following into the click event procedure:
Code:
GetFile ("[FileName]")
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel3, "tblLI", "[FileName]", True
The file select dialog comes up just fine, but whether I select a file or not, I keep getting a type mismatch error. I modified the code I found in that linked thread to show .xls files only. Any help on what it is I've done wrong?