Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Scribner
 
Posts: n/a
Default 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   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
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
Help with data not getting plotted Scott Ehrlich Excel Discussion (Misc queries) 2 January 25th 05 06:17 AM
Help with data not getting plotted Scott Ehrlich Charts and Charting in Excel 1 January 23rd 05 06:15 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 06:55 PM
Charting data ranges that change mikelee101 Charts and Charting in Excel 2 December 17th 04 12:07 AM
record macros in excel and get data from webpages sbhatia Excel Worksheet Functions 1 December 15th 04 10:47 PM


All times are GMT +1. The time now is 04:18 AM.

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

About Us

"It's about Microsoft Excel"