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
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