I have a table with changing lengths of the rows and columns. I want to make some formatting to the cells and I get error 438 - Object doesn't support this property or method when I try to execute the following code:
Code:
Sub ColorSet()
Dim cLL As Range, Rg As Range
'Set Rg = Range("A1:P10")
Application.ScreenUpdating = False
For Each cLL In Range("A1:P10")
If IsEmpty(cLL) Then
With cLL.Interior
.ColorIndex = 0
.Pattern = xlSolid
End With
Else
With cLL.Interior
.ColorIndex = 3
.Pattern = xlSolid
.LineStyle = xlContinuous
End With
End If
Next cLL
Application.ScreenUpdating = True
End Sub
Any help would be appreciated.