Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 563
- Office Version
- 365
- 2010
- Platform
- Windows
Not shown: s is declared as a string and fr1 is declared as range
The error message is associated with this line of code:
I'm not sure what I'm doing wrong. I followed the
syntax shown.
If you have any questions comments or concerns, please let me know. Thank you in advance.
VBA Code:
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"
s = Left(s, Len(s) - 2) & ":"
Cells(lLastRow, 9) = s
Set fr1 = Cells(lLastRow, "I").Find(s)
With fr1
.Characters(1, Len(s)).Font.Bold = True
End With
'
Code:
.Characters(1, Len(s)).Font.Bold = True
If you have any questions comments or concerns, please let me know. Thank you in advance.