T
tjtjjtjt
I'm new to VBA and I'm trying to write a macro that will copy a
user-specified range of cells to a user-specified destination. I've been
unable to pinpoint what I'm doing wrong. Nay help would be greatly
appreciated.
Here's what I've got at the moment:
Sub CopyPasteValue()
Dim CopyVal As Range
Dim PasteDest As Range
Dim i As String
Dim j As String
i = InputBox("Type a Cell Range to Copy. Ex: A1 or B4
15")
j = InputBox("Type the top left cell for the Paste destination. Ex: E20")
Set CopyVal = Worksheets("Sheet1").Range(i)
Set PasteDest = Worksheets("Sheet1").Range(j)
Range(CopyVal).Copy PasteDest
End Sub
user-specified range of cells to a user-specified destination. I've been
unable to pinpoint what I'm doing wrong. Nay help would be greatly
appreciated.
Here's what I've got at the moment:
Sub CopyPasteValue()
Dim CopyVal As Range
Dim PasteDest As Range
Dim i As String
Dim j As String
i = InputBox("Type a Cell Range to Copy. Ex: A1 or B4
j = InputBox("Type the top left cell for the Paste destination. Ex: E20")
Set CopyVal = Worksheets("Sheet1").Range(i)
Set PasteDest = Worksheets("Sheet1").Range(j)
Range(CopyVal).Copy PasteDest
End Sub