Their is a spreadsheet downloaded from a server daily. I want to through VBA create a table in access 2000 and import the spreadsheet (could be .xls or .xlsx) into the newly created table.
This is what I was working with --- not working properly, but I think *fingers crossed* it's close to it
Function ImportSpreadsheet
Dim filename, table, worksheetName As String
Dim hasFieldNames As Boolean
Dim ws As Integer
bhasFieldNames = False
table = "TestingImportThroughVBA"
worksheetName = "Sheet 2"
filename = "C:\Testing\TestWorksheet.xls"
For ws = 1 to 1
Do While Len(filename) > 0
DoCmd.TransferSpreadsheet acImport, acSpreadshetTypeExcel9, table, filename, hasFieldNames
Loop
Next ws
End Function