+ Reply to Thread
Results 1 to 2 of 2

VBA to APPEND rows to Existing Excel Worksheet

  1. #1
    Registered User
    Join Date
    07-18-2011
    Location
    Ruidoso NM
    MS-Off Ver
    Excel 2010
    Posts
    62

    VBA to APPEND rows to Existing Excel Worksheet

    Trying to clean up an Access DB that someone designed to talk back and forth a lot with Excel. At one point, data from several Access tables gets transferred to columns A thru L of an existing spreadsheet; original designer used a whole bunch of convoluted, arrays-within-arrays, loops-within-loops VBA to do that. I have a simple Access query set up that assembles all the appropriate bits and pieces from multiple tables, ready to move over to Excel where some fairly complex calculations can be done more efficiently (plus the client likes to look at that Excel workbook sometimes in addition to what he gets from the Access database).

    I've used TransferSpreadsheet at various times, sometimes to create an entire new worksheet on the receiving end, sometimes (if I recall correctly) to overwrite the previous transfer with new data. Situation here is, I need to APPEND rows, essentially adding new date-related data, to what's already there. I can code for that, or actually just plagiarize what the original owner did, but wondering if there's a simple way, with arguments to the TransferSpreadsheet procedure or something else, to tack on another xxx rows without mucking up what's already there. (What's already there, BTW, includes formulae on some rows, so the transfer would not pick those up, they'd have to be "brought forward" somehow.

    Ideas welcome, otherwise I'll start coding.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: VBA to APPEND rows to Existing Excel Worksheet

    This sounds like something I've done. First of all have you considered "pulling" the data from access using MS-Query instead of "pushing" it from Access?

    Secondly I suggest that you use Excel Tables to store the combined data and another table to store the queried in data. Excel tables know how big they are.

    Please Login or Register  to view this content.
    See this wiki for working with Excel Tables http://www.utteraccess.com/wiki/inde...ables_in_Excel.

    Note: MS-Query will bring in current data into an Excel table. You can set it up to do it upon opening the file and it can read parameters (like yesterday's date, for example) from calculated cells in the spreadsheet. Let me know if you are interested in the MS-Query approach and need help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to open closed file append new rows, and update existing rows
    By capson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-06-2014, 11:12 AM
  2. append rows of one worksheet onto another
    By hazzexcel in forum Excel General
    Replies: 4
    Last Post: 07-21-2010, 07:01 PM
  3. Replies: 3
    Last Post: 02-05-2008, 11:13 AM
  4. [SOLVED] Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:20 PM
  5. Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM
  6. [SOLVED] How do I create an excel macro to append to a cell with existing i
    By zola_tiara in forum Excel General
    Replies: 4
    Last Post: 09-14-2005, 04:05 PM
  7. append Data into an existing worksheet
    By Naresh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2005, 03:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1