+ Reply to Thread
Results 1 to 4 of 4

combo box in a user form

  1. #1
    juliejg1
    Guest

    combo box in a user form

    I have created a form containing a combo box using the following code:
    With cmbMonth
    ..AddItem "Jan"
    ..AddItem "Feb"
    ..AddItem "Mar"
    ..AddItem "Apr"
    ..AddItem "May"
    ..AddItem "June"
    ..AddItem "July"
    ..AddItem "Aug"
    ..AddItem "Sept"
    ..AddItem "Oct"
    ..AddItem "Nov"
    ..AddItem "Dec"

    It works great except once an entry is made, the contents in the form fields
    cleared, and another entry is to be made, the combo multiplies showing a
    doubled list of months. How can I keep these from doubling.

  2. #2
    Edwin Tam
    Guest

    RE: combo box in a user form

    Add the ".clear" after the first line.

    With cmbMonth
    .Clear
    .Additem "Jan"
    ....


    Regards,
    Edwin Tam
    [email protected]
    http://www.vonixx.com


    "juliejg1" wrote:

    > I have created a form containing a combo box using the following code:
    > With cmbMonth
    > .AddItem "Jan"
    > .AddItem "Feb"
    > .AddItem "Mar"
    > .AddItem "Apr"
    > .AddItem "May"
    > .AddItem "June"
    > .AddItem "July"
    > .AddItem "Aug"
    > .AddItem "Sept"
    > .AddItem "Oct"
    > .AddItem "Nov"
    > .AddItem "Dec"
    >
    > It works great except once an entry is made, the contents in the form fields
    > cleared, and another entry is to be made, the combo multiplies showing a
    > doubled list of months. How can I keep these from doubling.


  3. #3
    juliejg1
    Guest

    RE: combo box in a user form

    When I do this I get the following error message:

    Complie error: Expected Function or variable

    "Edwin Tam" wrote:

    > Add the ".clear" after the first line.
    >
    > With cmbMonth
    > .Clear
    > .Additem "Jan"
    > ....
    >
    >
    > Regards,
    > Edwin Tam
    > [email protected]
    > http://www.vonixx.com
    >
    >
    > "juliejg1" wrote:
    >
    > > I have created a form containing a combo box using the following code:
    > > With cmbMonth
    > > .AddItem "Jan"
    > > .AddItem "Feb"
    > > .AddItem "Mar"
    > > .AddItem "Apr"
    > > .AddItem "May"
    > > .AddItem "June"
    > > .AddItem "July"
    > > .AddItem "Aug"
    > > .AddItem "Sept"
    > > .AddItem "Oct"
    > > .AddItem "Nov"
    > > .AddItem "Dec"
    > >
    > > It works great except once an entry is made, the contents in the form fields
    > > cleared, and another entry is to be made, the combo multiplies showing a
    > > doubled list of months. How can I keep these from doubling.


  4. #4
    juliejg1
    Guest

    RE: combo box in a user form


    It worked after I tried it again..thanks for the help!

    "Edwin Tam" wrote:

    > Add the ".clear" after the first line.
    >
    > With cmbMonth
    > .Clear
    > .Additem "Jan"
    > ....
    >
    >
    > Regards,
    > Edwin Tam
    > [email protected]
    > http://www.vonixx.com
    >
    >
    > "juliejg1" wrote:
    >
    > > I have created a form containing a combo box using the following code:
    > > With cmbMonth
    > > .AddItem "Jan"
    > > .AddItem "Feb"
    > > .AddItem "Mar"
    > > .AddItem "Apr"
    > > .AddItem "May"
    > > .AddItem "June"
    > > .AddItem "July"
    > > .AddItem "Aug"
    > > .AddItem "Sept"
    > > .AddItem "Oct"
    > > .AddItem "Nov"
    > > .AddItem "Dec"
    > >
    > > It works great except once an entry is made, the contents in the form fields
    > > cleared, and another entry is to be made, the combo multiplies showing a
    > > doubled list of months. How can I keep these from doubling.


+ 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