hi, i am having a vba code which needs to collect data from a webpage and paste the vallues in my excell sheet, somehow when i make the code it should just past it, then it will work but when i use the option xlpastespecial xlpastevallues then i get an error "method pastespecial of object_worksheet failed" can someone explain me why?
here is the basic code, there is some coding i didnt mention, i placed only the coding which should effect on this error.
Dim xlWB As Excel.Workbook Dim xlSheet2 As Excel.Worksheet
Dim final As Range
Set xlWB = xlApp.Workbooks.Open(sFilePath & strPath) Set xlSheet2 = xlWB.Sheets("Sheet2")
Set final = xlSheet2.Range("A1")
ie.ExecWB 17, 0
ie.ExecWB 12, 0
final.PasteSpecial xlPasteValues
here is the basic code, there is some coding i didnt mention, i placed only the coding which should effect on this error.
Dim xlWB As Excel.Workbook Dim xlSheet2 As Excel.Worksheet
Dim final As Range
Set xlWB = xlApp.Workbooks.Open(sFilePath & strPath) Set xlSheet2 = xlWB.Sheets("Sheet2")
Set final = xlSheet2.Range("A1")
ie.ExecWB 17, 0
ie.ExecWB 12, 0
final.PasteSpecial xlPasteValues