K
King
I want to be able to for a user to select a worksheet name from a list
box. And then click a command button and have a dialog box open for
them to select the workbook.
I found this code which would do exactly what I want to do execpt I am
not sure how to get the data in the way I want.
Any help would be appreciated.
Public Sub ImportXL()
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="tmpTableName", _
FileName:="SomeExcelFile", Hasfieldnames:=True, _
Range:="'WorkSheet Name'!", SpreadsheetType:=5
'The Spreadsheet type = 5 specifies an Excel 5.0/7.0 file
'format
End Sub
Kris King
box. And then click a command button and have a dialog box open for
them to select the workbook.
I found this code which would do exactly what I want to do execpt I am
not sure how to get the data in the way I want.
Any help would be appreciated.
Public Sub ImportXL()
DoCmd.TransferSpreadsheet transfertype:=acImport, _
tablename:="tmpTableName", _
FileName:="SomeExcelFile", Hasfieldnames:=True, _
Range:="'WorkSheet Name'!", SpreadsheetType:=5
'The Spreadsheet type = 5 specifies an Excel 5.0/7.0 file
'format
End Sub
Kris King