+ Reply to Thread
Results 1 to 2 of 2

Macros to tranfer data to database

  1. #1
    Scribner
    Guest

    Macros to tranfer data to database

    I am using a macro to transfer data from and input sheet to a database use
    cutting and pasteing. I am not sure how to add new data without erase the
    data sent during the previous macro execution. Any help will be valued.

  2. #2
    Dave Peterson
    Guest

    Re: Macros to tranfer data to database

    Is there a column that always has data in it in your database?

    I'm gonna use column A for my example:

    Dim RngToCopy as range
    dim DestCell as range

    with worksheets("sheet1")
    set rngtocopy = .range("a5:G99") 'some range
    end with

    with worksheets("sheet2")
    set destcell = .cells(.rows.count,"A").end(xlup).offset(1,0)
    end with

    rngtocopy.copy _
    destination:=destcell

    ====
    It starts at A65536, comes up until it finds something, then drops down one row.

    Scribner wrote:
    >
    > I am using a macro to transfer data from and input sheet to a database use
    > cutting and pasteing. I am not sure how to add new data without erase the
    > data sent during the previous macro execution. Any help will be valued.


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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