Report

Copy paste macro needs tweak [Solved]

Ask a question frank7788 3Posts Tuesday March 1, 2016Registration date March 8, 2016 Last seen - Last answered on Mar 8, 2016 at 01:38 PM
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

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!