Data import from web, problem in Activesheet.Pastespecial in Excel 2003 though working perfectly in Excel 2007

vikas0903

New Member
Joined
Dec 17, 2013
Messages
20
Hi All,

Thanks for looking at the post.

I have written code to select all (from webpage), copy and paste (in excel sheet) in Excel 2007 and it is working perfectly.
But when my client who uses this program on 2003 version, he gets Error 1004. "Class worksheet pastespecial'

Following is the code snippet that I am using:

Code:
IE.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT
    Sleep (100)
With IE
        Do Until .readyState = 4: DoEvents: Loop
        Do While .Busy: DoEvents: Loop
        End With
IE.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
    Sleep (100)
With IE
        Do Until .readyState = 4: DoEvents: Loop
        Do While .Busy: DoEvents: Loop
        End With
  Sheets("WIP").Activate
  Range("A1").Select
  ActiveSheet.PasteSpecial format:="text", link:=False, DisplayAsIcon:=False
Error is appearing on line:
Code:
  ActiveSheet.PasteSpecial format:="text", link:=False, DisplayAsIcon:=False

Please help how to get this error away. Thanks again.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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