Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub CommandButton1_Click()
- Dim CopyRng As Range, PasteRng As Range
- Title = "Copy & Paste"
- Set CopyRng = Application.Selection
- Set CopyRng = Application.InputBox("Ranges to Copy :", Title, CopyRng.Address, Type:=8)
- Set PasteRng = Application.InputBox("Range to Paste, select Single cell):", Title, Type:=8)
- CopyRng.Copy
- PasteRng.Parent.Activate
- PasteRng.PasteSpecial xlPasteValuesAndNumberFormats
- PasteRng.PasteSpecial xlPasteFormats
- Application.CutCopyMode = False
- End Sub
Add Comment
Please, Sign In to add comment