Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change font to red and bold
Excel 2000
Help please, I would like to change the font to red and make it bold when the value is greater than 0.5. The color changes ok but when I add the bold=true statement it fails. Please correct me.. Private Sub workbook_sheetchange(ByVal sh As Object, ByVal Target As Range) If Not Intersect(Target, Range("f5:f33")) Is Nothing Then If Target.Value = 0.5 Then Target.Font.ColorIndex = 3: Target.Font.Bold = True End If End If End Sub TIA, derek |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change font to red and bold
Hello Derek
Have a line break between Target.Font.ColorIndex and Target.Font.Bold = True ie: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("f5:f33")) Is Nothing Then If Target.Value = 0.5 Then Target.Font.ColorIndex = 3 Target.Font.Bold = True End If End If End Sub HTH Regards Pascal "Derek" a écrit dans le message de news: ... Excel 2000 Help please, I would like to change the font to red and make it bold when the value is greater than 0.5. The color changes ok but when I add the bold=true statement it fails. Please correct me.. Private Sub workbook_sheetchange(ByVal sh As Object, ByVal Target As Range) If Not Intersect(Target, Range("f5:f33")) Is Nothing Then If Target.Value = 0.5 Then Target.Font.ColorIndex = 3: Target.Font.Bold = True End If End If End Sub TIA, derek |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bold Font | Excel Discussion (Misc queries) | |||
Bold font if statement | Excel Worksheet Functions | |||
Auto change to Bold Font | Excel Discussion (Misc queries) | |||
Bold Font question | Excel Discussion (Misc queries) | |||
How to show only bold font ? | Excel Worksheet Functions |