Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Userform FontStyle

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Trying to set the "ctrl" font to BOLD.....

    Sub cnmsUForm()
    Dim cnmsUF As VBComponent, ctrl As Control
    Dim i As Integer, top As Integer
    Set cnmsUF = ThisWorkbook.VBProject.VBComponents.Add(3)
    With cnmsUF
    .Properties("Caption") = "CNMS Data Analysis"
    Set ctrl = .Designer.Controls.Add("Forms.Commandbutton.1", "cb1", True)
    With ctrl
    .top = 10
    .Left = 10
    .Height = 18
    .Width = 100
    .caption = "Get Files"
    '.caption.Font.FontStyle.Bold = True
    End With
    End With
    End Sub

    HELP !!!!!!

    _________________
    VisLord -->

    [ This Message was edited by: VisLord on 2002-04-28 13:24 ]

  2. #2
    MrExcel MVP
    Colo's Avatar
    Join Date
    Mar 2002
    Location
    Kobe, Japan
    Posts
    1,456
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    2 Thread(s)

    Default

    Hi VisLord. Try this.


    Sub cnmsUForm()
    Dim cnmsUF As VBComponent, ctrl As CommandButton
    Dim i As Integer, top As Integer
    Set cnmsUF = ThisWorkbook.VBProject.VBComponents.Add(3)
    With cnmsUF
    .Properties("Caption") = "CNMS Data Analysis"
    Set ctrl = .Designer.Controls.Add("Forms.Commandbutton.1", "cb1", True)
    With ctrl
    .top = 10
    .Left = 10
    .Height = 18
    .Width = 100
    .Caption = "Get Files"
    .Font.Bold = True
    End With
    End With
    End Sub

    Hope this helps + pen pineapple apple pen!

    Masaru Kaji aka Colo - cellmasters.net

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks, Colo

    I thought I had tried that...
    tried every thing else...

    That worked...

    Duh...

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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