View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Keith Keith is offline
external usenet poster
 
Posts: 55
Default Quick syntax question- bolding userform control text via VBA

When I try to bold the text on a checkbox on my userform:

UserForm1.chk_A.font.fontstyle = "Bold"

(actually, my real code is:
UserForm1.Controls("cb_" & RowID).Font.FontStyle = "Bold"

I get a 438 error, doesnt support this property or method. A google search
find plenty of references to worksheet fontstyles (in which case I would
just use the macro recorder to get the syntax), but so far nothing on
bolding a control's text. I need to do this dynamically based on user
selections, otherwise I would just set it in the properties.

The control reference is good, because
UserForm1.Controls("cb_" & RowID).Value = True
works fine.

Any assistance would be greatly appreciated.
Thanks!
Keith