Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bold Font Peter Piper Excel Discussion (Misc queries) 2 August 12th 09 09:49 AM
Bold font if statement drb Excel Worksheet Functions 3 March 9th 08 09:01 PM
Auto change to Bold Font Centrol Excel Discussion (Misc queries) 3 October 6th 07 10:19 AM
Bold Font question Jenny B. Excel Discussion (Misc queries) 3 August 17th 07 04:02 PM
How to show only bold font ? hamz Excel Worksheet Functions 2 March 8th 06 04:51 AM


All times are GMT +1. The time now is 04:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"