Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting control on userform with part of control name (set question) Keith Excel Programming 4 January 10th 07 02:24 PM
Bolding text in a control text box. AJL Excel Discussion (Misc queries) 3 November 16th 06 05:39 PM
Quick, general userform question VB Newbie[_2_] Excel Programming 6 November 20th 05 01:16 AM
Quick Syntax Question UNOTech Excel Programming 1 May 18th 05 05:41 PM
Quick userform question. VB Newbie[_2_] Excel Programming 2 January 27th 05 07:25 PM


All times are GMT +1. The time now is 04:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"