I would like to change this code to use a named range instead of the A1:O3 currently in it. If i change this to a named range in my workbook, i get a error and the line
"Set rRng = Range(rRngtemp)" is highlighted
what am i not doing?????
Sub test()
Dim rRng As Range, Col As Integer
Dim cell As Range, rRngtemp As String, i As Integer
Col = 2
Set rRng = Range("a1:O3")
For Each cell In rRng
If cell.Column > Col Then
rRngtemp = rRngtemp & cell.Address & ","
End If
Next cell
rRngtemp = Left(rRngtemp, Len(rRngtemp) - 1)
Set rRng = Range(rRngtemp)
rRng.Select
End Sub
thanks
douglas
"Set rRng = Range(rRngtemp)" is highlighted
what am i not doing?????
Sub test()
Dim rRng As Range, Col As Integer
Dim cell As Range, rRngtemp As String, i As Integer
Col = 2
Set rRng = Range("a1:O3")
For Each cell In rRng
If cell.Column > Col Then
rRngtemp = rRngtemp & cell.Address & ","
End If
Next cell
rRngtemp = Left(rRngtemp, Len(rRngtemp) - 1)
Set rRng = Range(rRngtemp)
rRng.Select
End Sub
thanks
douglas