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:
Error is appearing on line:
Please help how to get this error away. Thanks again.
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
Code:
ActiveSheet.PasteSpecial format:="text", link:=False, DisplayAsIcon:=False
Please help how to get this error away. Thanks again.