Consulting

Results 1 to 2 of 2

Thread: Help with VBA Combo Box code in a word document

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Help with VBA Combo Box code in a word document

    Hi there,

    I have created a simple combo box macro in the attached word doc, the reason being the text characters I intend to use exceed the maximum allowed per regular drop-down lists.

    I'm having an issue whereby the options in the list are duplicating, sometimes there are the correct number of options but I find particularly after clicking save the drop-down options become duplicated.

    I am very new to VBA so I'm sure that I'm missing something fundamental here, any help or advice would be ,massively appreciated.

    The code I used is below:

    Private Sub ComboBox1_DropButtonClick()
    ComboBox1.AddItem "Option 1"
    ComboBox1.AddItem "Option 2"
    ComboBox1.AddItem "Option 3"
    ComboBox1.AddItem "Option 4"
    ComboBox1.AddItem "Option 5 "
    ComboBox1.AddItem "Option 6"
    ComboBox1.AddItem "Option 7"
    ComboBox1.AddItem "Option 8"
    ComboBox1.AddItem "Option 9"
    ComboBox1.AddItem "Option 10"
    ComboBox1.AddItem "Option 11"
    End Sub
    Attached Files Attached Files

Posting Permissions

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