Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel's Marco Convert data to Access
Thank you for reading my post.
I want to write a marco which can auto convert the excel sheet data into a existing access table. This program is design for new user to excel and access. Just click the marco will auto do all steps. Thank you. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel's Marco Convert data to Access
Paul
You don't give a lot of details, so I can't give you a lot of details. Here's an example that appends the data in a range called MyTable on the ActiveSheet to a table in the database c:\Dick\db1.mdb called Table 1. You need to set a reference in the VBE (Tools - References) to the Microsoft Access x.x Object Library. This is using XL2000, Acc97 and Win98. Sub AppendAccessTable() Dim acapp As Access.Application Set acapp = New Access.Application ThisWorkbook.Save acapp.OpenCurrentDatabase "C:\Dick\db1.mdb" acapp.DoCmd.TransferSpreadsheet acImport, _ acSpreadsheetTypeExcel97, _ "Table 1", _ ThisWorkbook.FullName, _ True, _ "MyTable" acapp.Quit Set acapp = Nothing End Sub -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "Paul" wrote in message ... Thank you for reading my post. I want to write a marco which can auto convert the excel sheet data into a existing access table. This program is design for new user to excel and access. Just click the marco will auto do all steps. Thank you. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert MS Excel data to MS Access database | Excel Worksheet Functions | |||
What is the Access equivalent of Excel's COUNTIF? | Excel Discussion (Misc queries) | |||
Getting Excel's charting capabilities from Access | Excel Discussion (Misc queries) | |||
How do I use Excel's convert function for apothecary weight? | Excel Worksheet Functions | |||
Urgent Help! Excel's Marco Convert to Access's db | Excel Programming |