A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Try this one.
ActiveSheet.PasteSpecial Format:="Text"
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a process which I copy data from a webpage and paste into a sheet. The webpage data is in a form so, I created a macro and attached to a button(shape) so I or whomever, can click it and paste values/text, rather than the entire format of the form and they don't have to right click, choose paste values/text, etc each time.
If pasted as text or values, I can manipulate and work wonders from there but, when I use the macro, it pastes either the form, or gives me an error.
What is the best method to paste using VBA when trying to accomplish this?
My first code (trial), I started off with this paste method... It pasted the entire form and everything which causes issues.
Range("B4").Select
ActiveSheet.Paste
Here is my entire second code (trial). It causes a debug on pastespecial when activated.
Sub PASTE_CONTROL()
Application.DisplayAlerts = False
Range("B4").PasteSpecial Paste:=xlPasteValues
Application.Run "FORMULATE_CONTROL_ONE"
Application.Run "FORMULATE_CONTROL"
Application.DisplayAlerts = True
End Sub
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Try this one.
ActiveSheet.PasteSpecial Format:="Text"