Unanswered: transferspreadsheet, sheetnumber instead of sheetname
I'm using this code (the entire procedure is not included)
to import sheets from excel to access tables. It all works very nice, as long as the sheets are using english sheetnames "sheet1"..."sheetX", but I was wondering if there's a way using the range variable with a sheet number rather than a name, as I don't always know the name of the sheets being imported.
importnavn = "temp" & Trim(Str(X))
Sheetnavn = "Sheet" & Trim(Str(X)) & "!"
boxstring = boxstring & "Ark" & Trim(Str(X)) & ";"
MsgBox "test: " & Sheetnavn & " test", vbOKOnly
DoCmd.TransferSpreadsheet acImport, , importnavn, filen, True, Sheetnavn
IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....