ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteSpecial of range class failed in Excel 2003 (https://www.excelbanter.com/excel-programming/359106-pastespecial-range-class-failed-excel-2003-a.html)

Sachin Vaishnav

PasteSpecial of range class failed in Excel 2003
 
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

K Dales[_2_]

PasteSpecial of range class failed in Excel 2003
 
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


"Sachin Vaishnav" wrote:

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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com