Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 563
- Office Version
- 365
- 2010
- Platform
- Windows
I'm probably tired or overthinking this, but how can I bold certain words inside a string or the entire string? Thank you
Range("A1").Characters(3,4).Font.Bold = True
Dim ctrl As MSForms.Control, cf As MSForms.Control
Dim s As String
For Each ctrl In Me.Controls
s = ""
If TypeName(ctrl) = "Frame" Then
For Each cf In ctrl.Controls
If "CheckBoxOptionButton" Like "*" & TypeName(cf) & "*" Then If cf.Value Then s = s & cf.Caption & ", "
Next
Select Case ctrl.Name
Case Is = "frmTask"
If s <> "" Then MsgBox Left(s, Len(s) - 2) & " with " & frmSelectedItem & ";", vbInformation, ctrl.Name
If s <> "" Then Cells(lLastRow, "I") = s & "with " & frmSelectedItem & ";"
End Select
End If
Next