tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I have this macro that resets the fonts on every sheet to black
it works great but I've just realised I don't want it to change the Dashboard sheets,
Is there a way to edit it (or start again if you have better ideas) so that it runs on all sheets unless they contain the word "Dashboard" in there sheet name
so "Master Dashboard" or "Sales Dashboard" etc would be unaffected?
Here's my code
Thanks
Tony
I have this macro that resets the fonts on every sheet to black
it works great but I've just realised I don't want it to change the Dashboard sheets,
Is there a way to edit it (or start again if you have better ideas) so that it runs on all sheets unless they contain the word "Dashboard" in there sheet name
so "Master Dashboard" or "Sales Dashboard" etc would be unaffected?
Here's my code
Thanks
Tony
Code:
[FONT=Calibri][SIZE=3][COLOR=#000000]Sub Fontcolour()[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] Dim ws AsWorksheet[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] On Error ResumeNext[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] For Each wsIn ActiveWorkbook.Worksheets[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000] With ws[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]Old = ws.Cells(Rows.Count, "A").End(xlUp).Row[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]Range("A2:R" & Old).Font.ThemeColor =xlThemeColorLight1[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]End With[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]Next[/COLOR][/SIZE][/FONT]
[FONT=Calibri][SIZE=3][COLOR=#000000]End Sub[/COLOR][/SIZE][/FONT]