If you are trying to go right and down of current selection then consider the following code.
As you later attempt to select in sheet 1 I am going to assume you actually meant Worksheet("Sheet1")
.
If that is the case you can more safely do the following:
Sub hi()
Dim dr As Range
With ThisWorkbook.Worksheets("Sheet1")
Set dr = .Range(Selection, .Cells(.Rows.Count, Selection.Column).End(xlUp).End(xlToRight))
End With
Debug.Print dr.Address
End Sub
Note:
Bear in mind that Cells
/Range
without a qualifying Worksheet will use the Activesheet
. See the excellent discussion here:
Is the . in .Range necessary when defined by .Cells?.
Synopsis:
With "." is faster, avoids potential for error 1004 and is generally considered best practice.