Modify a Range variable to the same cells in a different sheet?

Viewed 37

I need to modify a Range variable that was previously defined in the first sheet of the workbook so it contains the same cells but in the second sheet. I am trying the following but it isn't working:

Sub RangeToSheet2()

    Dim myRange As Range
    Set myRange = Range("A1")
    
    Set myRange = Sheets("Sheet2").Range(myRange)
    Sheets("Sheet2").Select
    myRange.Select

End Sub

This is a synthesis of the approach I am trying to use. I am new to programming, I have been looking for a solution for hours and still nothing. I hope someone can enlighten me. Thanks.

0 Answers
Related