Consulting

Results 1 to 2 of 2

Thread: ComboBox Bold Items

  1. #1

    ComboBox Bold Items

    Hi

    I am doing a powerpoint presentation with a combobox with options. I have written a code for adding and coloring the items in the combobox but i would also like to make these items bold. How do i do that?
    My code looks accordingly:




    Private Sub ComboBox1_DropButtonClick()
    If ComboBox1.ListCount = 0 Then
    ComboBox1.AddItem ""
    ComboBox1.AddItem "Passed"
    ComboBox1.AddItem "Not Passed"
    ComboBox1.AddItem "Follow-Up"
    ComboBox1.AddItem "blue"
    End If
    End Sub

    Private Sub ComboBox1_Change()

    If ComboBox1.ListIndex = 1 Then
    ComboBox2.Style = Bold
    ComboBox1.ForeColor = RGB(0, 150, 0)
    ElseIf ComboBox1.ListIndex = 2 Then
    ComboBox1.ForeColor = RGB(150, 0, 0)
    ElseIf ComboBox1.ListIndex = 3 Then
    ComboBox1.ForeColor = RGB(255, 200, 0)
    ElseIf ComboBox1.ListIndex = 4 Then
    ComboBox1.ForeColor = RGB(0, 0, 150)
    End If

    End Sub


    Private Sub ComboBox2_Change()

    End Sub

    Thank you for your help

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Try

    ComboBox1.Font.Bold=True (or False)

    I guess you know you cannot change just one entry - they will all change (but you will only see the chosen one maybe)
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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