I've tried the following unsuccessfully.
Sub TestRange()
Dim example As Range
Dim RangeStart As Long
Dim RangeEnd As Long
RangeStart = ActiveSheet.Cells(1, 1)
RangeEnd = ActiveSheet.Cells(3, 4)
Dim ws As Worksheet
Set ws = Worksheets("Sheet5")
With ws
example = ws.Range("E" & .Rows.Count).End(xlUp).Row
Set example = Range(.Cells(RangeStart, 1), .Cells(RangeEnd, 8))
End With
example.Select
Selection.Copy
End Sub
No comments:
Post a Comment