+ Reply to Thread
Results 1 to 3 of 3

Bold Font

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    09-27-2004
    Posts
    133

    Question Bold Font

    Visual Basic 6.3 w/Excel 2003

    I have a User Form that has a label control

    UserForm = frmEasyLyteQC
    Name = lblInstruction
    Caption = Open File


    When the user performs a certain action I would like the label font to change to a bold font

    I used the following:

    frmEasyLyteQC.lblInstruction.Font.Bold
    But when the program executes I get a Complile error: Invalid use of property.

    What's wrong ? Any way around it?

  2. #2
    Peter T
    Guest

    Re: Bold Font

    frmEasyLyteQC.lblInstruction.Font.Bold = True ' or False

    Regards,
    Peter T

    "scantor145" <scantor145.26erjm_1145276701.1221@excelforum-nospam.com> wrote
    in message news:scantor145.26erjm_1145276701.1221@excelforum-nospam.com...
    >
    > Visual Basic 6.3 w/Excel 2003
    >
    > I have a User Form that has a label control
    >
    > UserForm = frmEasyLyteQC
    > Name = lblInstruction
    > Caption = Open File
    >
    >
    > When the user performs a certain action I would like the label font to
    > change to a bold font
    >
    > I used the following:
    >
    >
    > Code:
    > --------------------
    > frmEasyLyteQC.lblInstruction.Font.Bold
    > --------------------
    >
    >
    > But when the program executes I get a Complile error: Invalid use of
    > property.
    >
    > What's wrong ? Any way around it?
    >
    >
    > --
    > scantor145
    > ------------------------------------------------------------------------
    > scantor145's Profile:

    http://www.excelforum.com/member.php...o&userid=14766
    > View this thread: http://www.excelforum.com/showthread...hreadid=533396
    >




  3. #3
    Tom Ogilvy
    Guest

    RE: Bold Font

    similar code worked fine for me:

    Private Sub UserForm_Initialize()
    Me.Label1.Font.Bold = True
    Me.Label1.Caption = "My Dog is big"
    End Sub

    --
    Regards,
    Tom Ogilvy


    "scantor145" wrote:

    >
    > Visual Basic 6.3 w/Excel 2003
    >
    > I have a User Form that has a label control
    >
    > UserForm = frmEasyLyteQC
    > Name = lblInstruction
    > Caption = Open File
    >
    >
    > When the user performs a certain action I would like the label font to
    > change to a bold font
    >
    > I used the following:
    >
    >
    > Code:
    > --------------------
    > frmEasyLyteQC.lblInstruction.Font.Bold
    > --------------------
    >
    >
    > But when the program executes I get a Complile error: Invalid use of
    > property.
    >
    > What's wrong ? Any way around it?
    >
    >
    > --
    > scantor145
    > ------------------------------------------------------------------------
    > scantor145's Profile: http://www.excelforum.com/member.php...o&userid=14766
    > View this thread: http://www.excelforum.com/showthread...hreadid=533396
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1