Okay, I figured this out. While I had the spreadsheet opened to read the tabs and find the range, I named the range. I then passed the range name as the variable after closing and saving the spreadsheet
I have the following code to use transferspreadsheet:
------------
Function mcrImportExcelTab1(sFile As String, sTab As String)
DoCmd.TransferSpreadsheet acImport, 8, "tblTempImport", sFile, True, sTab
End Function
-------------
My sTab variable comes in like this : Air PTE Criteria...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.