View Single Post
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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