So, I am trying to create sub procedure, where one of the arguments is column name.
Column name is then converted to column number.
Dim ColNum As Integer: ColNum = Range(ColumnNM & 1).Column
But when I try to use column number in range, with cell property I get 91 run-time error. Most of the solutions here are for not properly setting the range.
Run-time error 91
This here gives me that error :
Dim rngTA As Range: Set rngTA = wsTA.Range(Cells(24, ColNum))
and this (experimented, not sure if this is proper way to set range with string address)
Dim addr As String: addr = Cells(24, ColNum).Address(RowAbsolute:=False, ColumnAbsolute:=False)
Dim rngTA As Range: Set rngTA = wsTA.Range(addr)
I am stuck there.
Thanks.