Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick syntax question- bolding userform control text via VBA
have tried:
UserForm1.Controls("cb_" & RowID).Font.Bold=TRUE "Keith" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Quick syntax question- bolding userform control text via VBA
That's got it-
Thanks Corey! "Corey" wrote in message ... have tried: UserForm1.Controls("cb_" & RowID).Font.Bold=TRUE "Keith" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Selecting control on userform with part of control name (set question) | Excel Programming | |||
Bolding text in a control text box. | Excel Discussion (Misc queries) | |||
Quick, general userform question | Excel Programming | |||
Quick Syntax Question | Excel Programming | |||
Quick userform question. | Excel Programming |