if it's just excel data you're transferring i'd never
use ado but stick to 'pure' excel.
(probably faster
easier coding
less overhead
and less chance of memory leaking and strange lockups)
dim ws(1 to 2) as excel.worksheet
dim rg(1 to 2) as excel.range
set ws(1)=workbooks(1).worksheets(1)
set ws(2)=workbooks(2).worksheets(5)
ws(1).rows(13).copy ws(2).rows(15)
'or
ws(1).cells(123,18).entirerow.copy _
destination:=ws(2).cells(2^16,1).end(xlup).offset( 1).entirerow
'if you use .entirerow it doesn't matter in which column you 'start'
although 'generalized' that would work for me :)
keepITcool
< email : keepitcool chello nl (with @ and .)
< homepage:
http://members.chello.nl/keepitcool
"K.K." wrote:
Hi All,
I have an app in VB6 that will open an excel file, validate then
process the data, if the validation is failed for a record, I want to
copy (append) that record (entire row) from the original data
worksheet to an exisiting xls file ?
I think I prbably can use ADO connection to get the record but Do you
think using an ADO connection would Not be better?
Or there is another way to do it?
Thanks a lot!
K.K.