Jordan.Smith
12-17-2019, 12:22 PM
Trying to set the range via a function. Getting a 424 error
'Being Called here
Set findRng = FindFunction.SetRange(1, 1, 1, 100, WS)
'Function that should return the range
Function SetRange(firstRow As Long, firstColumn As Long, lastRow As Long, lastColumn As Long, WS As Worksheet)
SetRange = WS.range(WS.Cells(firstRow, firstColumn), WS.Cells(lastRow, lastColumn))
End Function
'Being Called here
Set findRng = FindFunction.SetRange(1, 1, 1, 100, WS)
'Function that should return the range
Function SetRange(firstRow As Long, firstColumn As Long, lastRow As Long, lastColumn As Long, WS As Worksheet)
SetRange = WS.range(WS.Cells(firstRow, firstColumn), WS.Cells(lastRow, lastColumn))
End Function