﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>A1VBCode Forums / Classic Visual Basic (VB 6 or earlier) / VBA(Excel, Word, etc...)  / Export Excel worksheet to Access using VBA / Latest Posts</title><generator>InstantForum.NET v4.1.1</generator><description>A1VBCode Forums</description><link>http://www.a1vbcode.com/vbforums/</link><webMaster>forums@a1vbcode.com</webMaster><lastBuildDate>Thu, 09 Sep 2010 01:56:28 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Export Excel worksheet to Access using VBA</title><link>http://www.a1vbcode.com/vbforums/Topic28797-14-1.aspx</link><description>Thanks for the response. Seems we have a problem at a certain area while compiling. It does not like the Dim statement as far as Dim db As &lt;FONT color=#ff1111&gt;Database&lt;/FONT&gt;, rs As &lt;FONT color=#ff1111&gt;Recordset. &lt;/FONT&gt;&lt;FONT color=#3333bb&gt;Any ideas?&lt;/FONT&gt;</description><pubDate>Thu, 04 Feb 2010 09:04:19 GMT</pubDate><dc:creator>sclward</dc:creator></item><item><title>RE: Export Excel worksheet to Access using VBA</title><link>http://www.a1vbcode.com/vbforums/Topic28797-14-1.aspx</link><description>Try this code&lt;br&gt;&lt;br&gt;Sub DAOFromExcelToAccess()&lt;br&gt;' exports data from the active worksheet to a table in an Access database&lt;br&gt;' this procedure must be edited before use&lt;br&gt;Dim db As Database, rs As Recordset, r As Long&lt;br&gt;    Set db = OpenDatabase("C:\FolderName\DataBaseName.mdb") &lt;br&gt;    ' open the database&lt;br&gt;    Set rs = db.OpenRecordset("TableName", dbOpenTable) &lt;br&gt;    ' get all records in a table&lt;br&gt;    r = 3 ' the start row in the worksheet&lt;br&gt;    Do While Len(Range("A" &amp; r).Formula) &gt; 0 &lt;br&gt;    ' repeat until first empty cell in column A&lt;br&gt;        With rs&lt;br&gt;            .AddNew ' create a new record&lt;br&gt;            ' add values to each field in the record&lt;br&gt;            .Fields("FieldName1") = Range("A" &amp; r).Value&lt;br&gt;            .Fields("FieldName2") = Range("B" &amp; r).Value&lt;br&gt;            .Fields("FieldNameN") = Range("C" &amp; r).Value&lt;br&gt;            ' add more fields if necessary...&lt;br&gt;            .Update ' stores the new record&lt;br&gt;        End With&lt;br&gt;        r = r + 1 ' next row&lt;br&gt;    Loop&lt;br&gt;    rs.Close&lt;br&gt;    Set rs = Nothing&lt;br&gt;    db.Close&lt;br&gt;    Set db = Nothing&lt;br&gt;End Sub&lt;br&gt;</description><pubDate>Mon, 01 Feb 2010 06:16:39 GMT</pubDate><dc:creator>paul daniel</dc:creator></item><item><title>Export Excel worksheet to Access using VBA</title><link>http://www.a1vbcode.com/vbforums/Topic28797-14-1.aspx</link><description>I'm wanting to export an Excel worksheet to an existing Access table. I want to do this from within Excel using VBA and a user macro. I want to be able to append the existing records within the Access table. What's the best way to do this? Thanks.</description><pubDate>Sun, 31 Jan 2010 12:08:31 GMT</pubDate><dc:creator>sclward</dc:creator></item></channel></rss>