helai
06-13-2006, 04:24 AM
I have two sheets placed on different workbooks
Now I want to pick up the items with same artno but different attribute,
if the data are stored in access, I think it's easy
with select...from ...where... rst.open
but now how can I use the same method in excel,because I think it's more quicker thank the normal method
just like
for i=1 to 7777
if worksheets("sheet1").cells(i,1)=...
next i
here attached the code only allowed to open a workbook at the same time
how to create the linkage between these two workbooks?
of course if I copy contents from the other workbooks to the one which I want to use ADO connection,but I think thus I have to preserve one blank sheet and it will cost resources also
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
With CNN
.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & _
"extended properties='Excel 8.0;hdr=no';" & _
"data source=C:\book10.xls"
Any advices are welcome
heali
Now I want to pick up the items with same artno but different attribute,
if the data are stored in access, I think it's easy
with select...from ...where... rst.open
but now how can I use the same method in excel,because I think it's more quicker thank the normal method
just like
for i=1 to 7777
if worksheets("sheet1").cells(i,1)=...
next i
here attached the code only allowed to open a workbook at the same time
how to create the linkage between these two workbooks?
of course if I copy contents from the other workbooks to the one which I want to use ADO connection,but I think thus I have to preserve one blank sheet and it will cost resources also
Dim CNN As New ADODB.Connection
Dim RST As New ADODB.Recordset
With CNN
.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & _
"extended properties='Excel 8.0;hdr=no';" & _
"data source=C:\book10.xls"
Any advices are welcome
heali