jkwleisemann
New Member
- Joined
- May 31, 2016
- Messages
- 19
I'm trying to set the interior color of a row, and for some reason I'm getting a "subscript out of range" error when I use the Interior.ColorIndex property. The goal is to mark Saturdays and Sundays in a chart. Code follows; any tips?
Code:
If WorksheetFunction.Weekday(datWork, 1) = 1 Or WorksheetFunction.Weekday(datWork, 1) = 7 Then
Worksheets(4).Range(12 + i & ":" & 12 + i).Interior.ColorIndex = RGB(128, 128, 128)
End If