PasteSpecial of range class failed in Excel 2003


G

Guest

Hi!

I have an exe which fetches the data from the database and then populates
the Excel file. And then it is emailed to the user.

If this exe is requested con-currently couple of times, then this error
occurs.

PasteSpecial of range class failed.

I have one fixed formatted row in the Template file which then I am copy -
pasting for further row addition.

Does it have anything to do with clipboard issue?

Please help.

Thanks and Regards,
Sachin Vaishnav
 
Ad

Advertisements

G

Guest

I would suspect it is a timing issue - especially if the paste range comes
from or is going into the area that is coming from the database. If Excel is
still busy retrieving data (as it might be if this is running concurrently)
then it may not allow you to paste at the time you are trying to do it.

How are you retrieving the data? MSQuery? Is the backgroundquery property
set to true? If so try false. If backgroundquery is on your code can
continue running even if the data is not yet retrieved; setting it off forces
your code to wait for the data to be populated.
- K Dales
 
Ad

Advertisements

G

Guest

Hi!

In my case, I am using a DLL method to paint the EXE.

Lets say one instance of EXE is running and busy in painting the data. And
at that time, if 2nd instance of same EXE also starts, I hvae observed two
types of issues.
1) Sometimes, the first exe paints some data of the 2nd exe..over the
already painted data!!!
2) It gives Paste special of range class failed error.

I know both sounds very weird...but thats how the problem is.

Has anybody come across such issue?

Please help.

Regards,
Sachin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top