how to apply bold within string text
1. Right click the sheet tab of sheet "Input" (where the sheet name is).
This will display a popup toolbar that lets you select from a number of
options. Selet the "View Code" option. The sheet's code module should appear.
Then simply paste the appended (slightly updated) code.
2. Note that you will need to change the part where it references
Sheets("Sheet1").Range("D5")
to the appropriate sheet name and cell. You may also wish to tinker with the
code a bit.
3. You also need to enable macros for it to work. Ensure that High security
is not set. Set to either Medium or Low through: Tools Macro Security
Security Level tab.
4. Code follows:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
Dim t1 As String, t2 As String, t3 As String
Set c = Range("B10")
t1 = "Your application will be renewing on "
t2 = Format(c.Value, "mmmm dd yyyy")
t3 = ". In an effort to furnish you with the coverage that..."
With Application
.EnableEvents = False
With Sheets("Sheet1").Range("D5")
.Font.Bold = False
.Value = t1 & t2 & t3
.Characters(Len(t1) + 1, Len(t2)).Font.Bold = True
End With
.EnableEvents = True
End With
Set c = Nothing
End Sub
Regards,
Greg
|