Macro Help - Copy from Clipboard to start my Macro

kimon90

New Member
Joined
Mar 26, 2021
Messages
1
Office Version
  1. 2010
Platform
  1. Windows
Hi Guys,

I need your help in a macro I am trying to build. I have a procedure where I start by coping to clipboard a row from another excel sheet, with an intention of pasting on my current sheet and edit further.
To automate my procedure, I am running the below macro.

[IMG alt="thumbnail image 1 of blog post titled











Macro Help - Copy from Clipboard to start my Macro












"]https://techcommunity.microsoft.com...A521009B90/image-size/large?v=v2&px=999[/IMG]
When I am running the code, I am getting a 'run-time error '1004'"

[IMG alt="thumbnail image 2 of blog post titled











Macro Help - Copy from Clipboard to start my Macro












"]https://techcommunity.microsoft.com...4676CB8E60/image-size/large?v=v2&px=999[/IMG]
I suspect the error occurs as I am not instructing it to copy the clipboard content.
Can you fix my code, for it starts with coping from clipboard (and the rest remain as it is?)

Thanks in advance,
Kimon

PS:
My current code is:
Sub Macro1()
'
' Macro1 Macro
'

'
Sheets("DATA1").Select
Rows("2:2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Rows("3:3").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("SCANER").Select
Rows("1:1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,730
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: Macro Help - Copy from Clipboard to start my Macro
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,119
Messages
5,640,226
Members
417,131
Latest member
Seanr19871

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top