PDA

View Full Version : Paste from Webpage



robws8743
06-26-2014, 07:40 PM
I need a macro that will paste 2 rows of 6 values, copied from a webpage, into cells A1 to F2 of my worksheet. I can do it manually, but when I try to put it into a macro it pastes the data but then gives me an error saying the paste method is not valid???
Thanks for the help.

westconn1
06-27-2014, 01:32 AM
if you show the code you have problem with, maybe someone can help to fix

robws8743
06-27-2014, 08:09 AM
if you show the code you have problem with, maybe someone can help to fix

westconn1
06-27-2014, 03:01 PM
then post the code from the macro recorder

robws8743
06-27-2014, 11:39 PM
Here's the code generated from my attempt to record.... only one line generated. I tried on a Blank workbook and it worked.... then copied the macro to my workbook and it still worked.... a couple times... then gave me the error I mentioned previously but still pasted the data. The problem is, I want to add more code after the paste so don't want to have it halt with the error.


Sub PasteFromLinks()
'
' PasteFromLinks Macro
'
' Keyboard Shortcut: Ctrl+q
'



ActiveSheet.PasteSpecial Format:="HTML", Link:=False, DisplayAsIcon:= _
False

End Sub