+ Reply to Thread
Results 1 to 3 of 3

Initialize error with multiple Comboboxs & lists

  1. #1
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418

    Initialize error with multiple Comboboxs & lists

    Hi

    I have a userform used to insert new vehicle details onto a spreadsheet. below is the code used in two of the boxes to choose the service intervals and the engine type. There is another combobox on the form, however when I try the same type of code for more than 1 box I receive an error on the "Sub Userform_Initialize" line. I assume I need to change something on the 'Sub' line but I cannot figure out what!!!,,, can someone help please

    thanks

    Please Login or Register  to view this content.
    Last edited by JamesT1; 10-02-2008 at 01:26 PM. Reason: Title & Code

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    Hi JamesT1,

    There are couple of changes needed here.

    1. You need to use the ListBox control on your form as the AddItem command isn't applicable for text boxes
    2. As there can only be one UserForm_Initialize command on a form, all the events (code) you want to run from its' execution must be entirely within it.

    For reference, I've created a dummy form on the attached with the above points worked in.

    HTH

    Robert
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    08-04-2008
    Location
    West Calder, Scotland
    MS-Off Ver
    365
    Posts
    418
    Trebor76

    thankyou for your help,,, works fine now,,, much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create lists with multiple choice options
    By Proejo in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-30-2007, 08:36 AM
  2. Replies: 4
    Last Post: 08-12-2007, 09:51 PM
  3. working with multiple drop-down lists
    By gerryger in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-31-2007, 07:52 PM
  4. combining multiple lists from different sheets
    By falcn9az in forum Excel General
    Replies: 1
    Last Post: 03-28-2007, 04:02 AM
  5. Help with drop lists in a userform!
    By koda86 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2006, 04:56 AM

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