[Solved] How to overcome “object variable or with block variable not set” in excel VBA? [duplicate]

[ad_1]

You have to set the variable:

Sub bordersTest()
  Dim theRange As Range

  Set theRange = Range(ActiveCell, ActiveCell.End(xlDown).End(xlToRight))
  theRange.Select
End Sub

1

[ad_2]

solved How to overcome “object variable or with block variable not set” in excel VBA? [duplicate]