• Combo Box Contents (2003)

    • This topic has 4 replies, 3 voices, and was last updated 19 years ago.
    Author
    Topic
    #431584

    I asked a question yesterday about a survey that I was creating in PowerPoint using VBA. I think I have gotten over most all of my hurdles, but one question/technique remains a mystery. When creating ComboBoxes, I can not find any way to create the list of contents. I do not want to draw the choices from anywhere else, I just want them to be static list entries.

    So say I wanted a combo box with Choice 1 through Choice 3 in it. The only way I found to edit the CB contents was to use a tool called the PowerPoint VBA Controls Assistant. This tool sits at the bottom of the Edit menu and allows you to add the CB and edit its contents on the fly, or you can select the CB and then edit the contents at any time after creation.

    I have searched and searched and can not find out how to create the content list without this tool. Also, can someone recommend a comprehensive VBA book, and a good source of code snippets. I searched the lounge and came up dry too.

    Thanks!

    Andy

    Viewing 0 reply threads
    Author
    Replies
    • #1010494

      Edited by HansV to make URL clickable – see Help 19

      One additional problem. I used the VBA Controls Assistant (http://officeone.mvps.org/ppvba/ppvba_using.html%5B/url%5D) to populat eht combBox’s, but when I ship the presentation to someone else, the comboBox’s are no longer populated.

      Can someone tell me what I have missed in trying to ship this off to someone else from my machine? I can not enclose my presentation it is apparently too big. There is code for a “Submit” button click, but nothing else. I have no idea where the ComboBox values are being stored..

      Thanks,

      Andy

      • #1010505

        I populate UserForm controls in the _Initialize event handler.

        Open the code module for your userform and choose UserForm in the left drop box and Initialize in the right box.

        Then create code such as:

        with Me.ComboBox1
        .AddItem “Choice 1”
        .AddItem “Choice 2”
        .AddItem “Choice 3”
        End with

      • #1010589

        I think you are using controls on a slide, so Jefferson’s reply would not apply to your situation.
        The problem you mention is one of the reasons why PowerPoint is less than ideal for this. In Excel, it would be much easier – you can populate a combo box from a range of cells.

    Viewing 0 reply threads
    Reply To: Combo Box Contents (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: