Same exported data for different set of query

dhen21dx

Board Regular
Joined
May 10, 2013
Messages
166
Hi,

Is anybody experienced here for first export, there is the same exported data in excel.

Let say i have a table below, in my code i exported Apple on my first export using .ActiveCell.CopyFromRecordset rstApple and my second export is .ActiveCell.CopyFromRecordset rstOrange for Orange, but the data on Apple is also being exported to Orange. When reexport again, its now corrected.

My question, why it is happened on first export that Apple is being exported for Orange file as well.

NameAddressCharCode
AppleUSo
OrangePLs
AppleUSp
AppleUKl
OrangeDEo
KiwiMYp
KiwiMYr
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
I don't know what our code looks like. But the default with copyrecordset is that all lines will be copied. If you specify 2 lines than the first two lines will be copied. Maybe if you post your cade can someone see where the issue is.

Please post your code in code tags
 
Upvote 0

Forum statistics

Threads
1,221,508
Messages
6,160,222
Members
451,631
Latest member
coffiajoseph

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top