+ Reply to Thread
Results 1 to 7 of 7

Userform with ComboBox

  1. #1
    Registered User
    Join Date
    07-26-2011
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    40

    Userform with ComboBox

    Hi all

    I am a complete noob with userforms and combo boxes but keen to learn.

    I have created a userform which runs off my "Job Summary" sheet when "Button 1" is clicked.

    The Userform loads OK but then the 2 problems appear;
    1) The values for the combo boxes are not loading
    2) When I enter the info and press Done the worksheet is not being populated

    Can anyone please help? FYI I only expect the first 6 questions to work as I planned on getting those working then finishing the user form.

    Thanks to all for your time and help!
    Attached Files Attached Files
    Last edited by ashmott; 08-31-2011 at 03:43 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Userform with ComboCox

    Looks like you've typed in the title for the Initializze event. Unfortunately MS uses american spelling so it isn't Initialise

    Please Login or Register  to view this content.
    Always pick events from the drop down
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    07-26-2011
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Userform with ComboCox

    Thanks Roy that solves the combo box issue.
    Any idea why the values are not being returned in my worksheet?

    Ashley

  4. #4
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Userform with ComboCox

    Hi ashmott
    a couple of things
    The values for the combo boxes are not loading
    I don't quite know how you have managed it but the spelling of your "Userform_Initialize()" event title should be spelt with a "z" and not a "s"
    When I enter the info and press Done the worksheet is not being populated
    Fixing the above allows the comboboxes to populate
    However, in your "JobSummDetails()" procedure:
    .. there is a stray "End if" that needs commenting out
    .. there is as yet no combobox control called "cboCheckedHandiDetails"
    (I would also qualify each control with its parent userform)
    .. you need to provide code to respond to the "Done" button - perhaps something like:
    Please Login or Register  to view this content.
    Then check the destination ranges of some of your data.
    Thi sshould get you back on track.
    Barry
    PS I have just noticed that RoyUK responded first so acknowledgement to him

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Userform with ComboCox

    You need to watch spelling, your Thread Title says ComboCox not Box.


    You have typos in the .Offset, value is in the wrong place & Ithink you are writing to Column 2 not 3

    Also, the code needs to be in the button's click event

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-26-2011
    Location
    melbourne
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Userform with ComboBox

    Thank you so much to all I am now up and running. Sorry about the spelling mistakes but i do appreciate your help.

    Ashley

  7. #7
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Userform with ComboBox

    If you add Option Explicit to the top of the code modules, spelling mistakes will be picked up

    In the VB Editor click Tools -> Options -> Editor make sure that Require Variable Declarations is checked

+ 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