Hi there. I got the following code to reset the interior colorindex of cells in several sheets before the worksheets closed. But the myrngstring, I think, was not allowed to be the pre-set range. I got an error message.
Code
For k = 5 To ofname
If Trim(Cells(k, 2).Value) = ckname Then
myrngstring = Range(Cells(k, 1), Cells(k, 34)).Address
For Each ws In Worksheets
If ws.Visible Then
ws.Range(myrngstring).Interior.ColorIndex = xlNone
End If
Next
End If
Next
Can anyone please advise?
Cheers.