I'm sure there is an easy explanation for this, but I can't see it at the moment!
All I'm trying to do is clear some cells and change the interior colour based on the value of a Control Toolbox checkbox. However, I receive an error '1004 - unable to set ColorIndex property of Interior Class'. The code is so simple
It works fine if I wrap the ColorIndex line in a single sub.Private Sub CheckBox1_Click() Dim myRange As Range Set myRange = Worksheets("Sheet7").Range("A1:D1") If CheckBox1.Value = True Then With myRange .Interior.ColorIndex = 6 .Value = "" End With End If End Sub
Sorry if this is a bit stupid but I'm stumped!
Thanks
Iain - XL97 on NT4