Link to home
Start Free TrialLog in
Avatar of PipMic
PipMicFlag for Gibraltar

asked on

Excel tables to MSAccess

Hi all,

Grateful if anyone could show me how to convert the data in an Excel workbook with has three worksheets into an MSAccess table from MSAccess.

Preferably I would like to know if it can be done using vba.

I am attaching my sample excel file so it can be seen.

Thanks
tablesforAccess.xls
Avatar of PipMic
PipMic
Flag of Gibraltar image

ASKER

my apologies the heading "Date" is missing in each of the tables...
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PipMic

ASKER

Tried this one line but no luck:

DoCmd.TransferSpreadsheet acImport, 8, "table1", "c:\1\tablesforAccess.xls", True, "sheet1!"

Compile error
Invalid outside procedure
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PipMic

ASKER

very good