I'm using the following code to try and select the cell at the intersection of MyRow
and MyCol
. The current values are MyRow
: 6 and MyCol
: 4 which should select D6
.
I can't get the correct syntax for the last line which is where it fails:
Sub SelectCS()
Dim MyRow As Integer
Dim MyCol As Integer
MyRow = Sheet1.Range("a4").Value
MyCol = Sheet1.Range("a5").Value
Range((MyRow), (MyCol)).Select
End Sub