WaterLover
New Member
- Joined
- Mar 27, 2018
- Messages
- 5
I'm copying (Ctl-C) tabular data from a website and wanting to Paste it into my spreadsheet. When I manually select the destination cell and type Ctl-V it works just fine. However, when I try Pasting it via VBA I'm getting the Run-time error 1004 (PasteSpecial method of Range class failed).
My code is simple:
Also, I had If Application.CutCopyMode = True set as a condition before Pasting and it kept thinking the clipboard was empty - eventhough, Ctl-V continued to work.
I've read about Macros getting in the way of Pasting via VBA but I don't know how to fix this or get around it.
Any ideas?
My code is simple:
range("A4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Also, I had If Application.CutCopyMode = True set as a condition before Pasting and it kept thinking the clipboard was empty - eventhough, Ctl-V continued to work.
I've read about Macros getting in the way of Pasting via VBA but I don't know how to fix this or get around it.
Any ideas?