When I replace "Activesheet.cells" in the "lFundcolumn" below with "rnMonths" I'm getting a "Run time error 13". I would be grateful if someone could explain what I'm doing wrong here please.
In short - I want to find a value within a row and copy that column and the column to the right of it. Below is the code for locating the first column which is erroring.
Sub Roll_period()
Dim sMonth As String
Dim rnMonths As Range
Dim lFundcolumn As Long
Dim rnRngtocopy As Range
sMonth = ActiveSheet.Cells(3, 1).Value
Set rnMonths = ActiveSheet.Rows(4)
lFundcolumn = rnMonths.Find(What:=sMonth, after:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, searchorder:=xlByColumns).Column