I am using the following code to create a spreadsheet that has all the days of the week for that month and would like to set the background color for both Saturday and Sunday to gray, any Ideas?
Code:
' Put in the first day of the current month
ws.Range("A8").Value = DateSerial(Year(Date), Month(Date), 1)
' AutoFill Column "A" with all the dates of the month
ws.Range("A8").AutoFill Destination:=ws.Range("A8").Resize(DateSerial(Year(Date), Month(Date) + 1, 1) - DateSerial(Year(Date), Month(Date), 1))
' AutoFill Column "B" with the days of the week
ws.Range("B8").Resize(DateSerial(Year(Date), Month(Date) + 1, 1) - DateSerial(Year(Date), Month(Date), 1)).Formula = "=TEXT(A8,""DDDD"")"