Good morning!
I've been using this code to restore the colors of several thousand hyperlinks on my sheet. It gets the job done but it's too darn slow. Here's the code:
I've been using this code to restore the colors of several thousand hyperlinks on my sheet. It gets the job done but it's too darn slow. Here's the code:
VBA Code:
Sub RestoreFormatting()
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Dim hl As Hyperlink
'Restore Hyperlink Color
For Each hl In Range("CalendarHyperlinks").Hyperlinks
hl.Range.Font.Color = RGB(0, 0, 255)
Next
'Restore SubLotColumn Hyperlinks
For Each hl In Range("SubLotColumn").Hyperlinks
hl.Range.Font.Color = RGB(0, 0, 0)
Next
'Restore CalendarFieldManagersColumn Color
For Each hl In Range("CalendarFieldManagersColumn").Hyperlinks
hl.Range.Font.Color = RGB(0, 0, 0)
Next
'Restore CalendarLinkRow Color
For Each hl In Range("CalendarLinkRow").Hyperlinks
hl.Range.Font.Color = RGB(0, 0, 255)
Next
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub