Results 1 to 5 of 5

Thread: Bold only part of a label

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    4

    Bold only part of a label

    I am making a Label using VBA in Microsoft Word 2010. The Label is made up of several texts and numbers.
    >
    Label1.Caption = "Avg: " & the_average & " - " & count_of_1
    >
    Now, I want to make only the first part which is ("Avg: ") be bold. The rest must not be bold. How can I do that?
    Thanks in advance

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Bold only part of a label

    Welcome to the forum tikrit

    Question crossposted at http://stackoverflow.com/questions/1...art-of-a-label
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Bold only part of a label

    How can I do that?
    not in a label control, you might try a rich text box, or multiple labels adjoining, positioning at the end of the text of the previous
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2013
    Posts
    4

    Re: Bold only part of a label

    Unfortunately it is not possible even by programming.
    thank you

  5. #5
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Bold only part of a label

    Unfortunately it is not possible
    not in a label, but the appearance you desire is possible using other methods
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width