Hello,
To preface I'm a total noob with VBA but I found a simple VBA function on the web that tests if a cell is bold or not and returns true or false. I also have some conditional formatting set up to turn text bold if it's within a certain date.
My problem is that even though the conditional formatting works and turns the text bold, the "ISBOLD" function still returns false. Is there a way to modify the VBA to detect the bold text?
To preface I'm a total noob with VBA but I found a simple VBA function on the web that tests if a cell is bold or not and returns true or false. I also have some conditional formatting set up to turn text bold if it's within a certain date.
My problem is that even though the conditional formatting works and turns the text bold, the "ISBOLD" function still returns false. Is there a way to modify the VBA to detect the bold text?
Code:
Function ISBOLD(cell As Range) As Boolean
Application.Volatile True
On Error GoTo PartiallyBold
ISBOLD = cell.Characters.Font.Bold
On Error GoTo 0
Exit Function
PartiallyBold:
If Err.Number = 94 Then ISBOLD = True
End Function