Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert MS Excel data to MS Access database HelpJim Excel Worksheet Functions 6 January 2nd 06 03:51 PM
What is the Access equivalent of Excel's COUNTIF? RedStep Excel Discussion (Misc queries) 1 April 6th 05 09:36 PM
Getting Excel's charting capabilities from Access vince Excel Discussion (Misc queries) 1 March 26th 05 04:29 PM
How do I use Excel's convert function for apothecary weight? S Code Excel Worksheet Functions 1 November 19th 04 07:13 PM
Urgent Help! Excel's Marco Convert to Access's db Paul Chan Excel Programming 1 August 16th 03 11:58 AM


All times are GMT +1. The time now is 10:47 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"