hotspot1972
New Member
- Joined
- Jul 9, 2020
- Messages
- 16
- Office Version
- 2013
- Platform
- Windows
Hi. I need to highlight the weekends on my tabs. Change the colour of the tab
I run a macro on the first day of the month and it populates the dates onto the tab names.
Private sub commnadbutton2_click
Dim shtcount as long
Dim Sarea as date, Earea as date
Sarea = InputBox("What is the start date?")
Earea = InoutBox("What is the end date?")
Shtcount = EArea - Sarea + 1
For i = 1 to shtcount
Sheets(i).Activate
If i = 1 then
Activesheet.Name = Format(SArea, "dd-mm-yy")
Else
ActiveSheet.Name = Format(SArea, "dd-mm-yy")
End if
SArea =SArea + 1
Next i
End sub
I run a macro on the first day of the month and it populates the dates onto the tab names.
Private sub commnadbutton2_click
Dim shtcount as long
Dim Sarea as date, Earea as date
Sarea = InputBox("What is the start date?")
Earea = InoutBox("What is the end date?")
Shtcount = EArea - Sarea + 1
For i = 1 to shtcount
Sheets(i).Activate
If i = 1 then
Activesheet.Name = Format(SArea, "dd-mm-yy")
Else
ActiveSheet.Name = Format(SArea, "dd-mm-yy")
End if
SArea =SArea + 1
Next i
End sub