0
votes

I am getting a 1004 error but I am not sure why?

Sub my_script()

Sheets("mysheet").Select
    ActiveSheet.Range(Rows(6)).Font.Color = vbWhite

End Sub
1

1 Answers

2
votes

There's no need to Select the worksheet in order to modify row 6 font's color.

Also, Range(Rows(6)) is not valid, use Rows(6).

Sub my_script()

Sheets("mysheet").Rows(6).Font.Color = vbWhite

End Sub