Report

Copy paste macro needs tweak [Solved]

Ask a question frank7788 3Posts Tuesday March 1, 2016Registration date March 8, 2016 Last seen - Latest answer on Mar 8, 2016 01:38PM
Hello,
I'm new to VBA, and would appreciate any help with this Macro. It copys the mouse input, but overwrites the last paste. I need it to (after I hit a command
button) to ask (with input box) where to paste. I would click "D32" or any other
cell in the same worksheet.
Thanks
Sub CopyStuff()
Dim x As Range
Dim y As Range
Set x = Application.InputBox("Select what copy using the mouse", Type:=8)
Set y = ActiveWorkbook.Sheets("Sheet2").Range("C32")
x.Copy y
End Sub
See more 
Helpful
+0
moins plus
Hi Frank,

You basically gave yourself the answer:
Sub CopyStuff() 

Dim x As Range 
Dim y As Range 

Set x = Application.InputBox("Select what copy using the mouse", Type:=8) 
Set y = Application.InputBox("Select where paste using the mouse", Type:=8)

x.Copy y 

End Sub 


Best regards,
Trowa

Add comment
Helpful
+0
moins plus
Thanks for the reply......It works!
Add comment

Members get more answers than anonymous users.

Being a member gives you detailed monitoring of your requests.

Being a member gives you additional options.

Not a member yet?

sign-up, it takes less than a minute and it's free!