I have 3 worksheets named "Andre", "Gordo" and "Howard". The following line works:
Worksheets(1).Range(Cells(5, 3), Cells(10, 25)).Interior.Color = RGB(255, 0, 0)
The following lines do not work. All I am doing is changing the index number in the Worksheets collection. I get Run-time Error 1004, Application-Defined or Object-Defined Error.
Worksheets(2).Range(Cells(5, 3), Cells(10, 25)).Interior.Color = RGB(255, 0, 0)
Worksheets(3).Range(Cells(5, 3), Cells(10, 25)).Interior.Color = RGB(255, 0, 0)
What is wrong here?
Bookmarks