+ Reply to Thread
Results 1 to 9 of 9

Userform help needed - matching combox value to worksheet identifiers

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Question Userform help needed - matching combox value to worksheet identifiers

    Hi all,

    I'm working on a new man power vs workload calculator in excel for work.

    I've built the overall design and various userforms, cell formula's etc but I'm a little stuck on the complex VBA i need to implement for the document to actually work as design.

    As you can see from the image attached, I have a Project Details Form. This form has three comboboxes that retrieve data from the DataTables worksheet. All the data on the DataTables sheet is persistent baring the Project names, as they will always change. All other data, TesterID's, Test Types, Workload Slots etc will always be the same.

    Ok, so the problem I have is I need to know how to get the userform to find and match the slot number found on the "Calculator" sheet with the slot number the user has selected on the userform.

    From there, I would like the userform to populate the corresponding cells to the right of the selected slot with the other data from the userform; Project name and Test Stage.

    For example; the user opens the userform. Selects "Slot_01" from the workload slot #, and then selects "Dumby Project 1" from the "Project" drop down. And finally "1st Full QA" from the "Test Stage" drop down. If the user then hits "Submit", the above data should be populated in Row 11, in cells B11, D11 and F11.

    If anyone can help me with this, I'd be most grateful.

    Please ignore the "Durations" section of the userform. I can probably work that out once I have the other part sorted.

    Many Thanks,

    Adam

    FYI - the same question was asked on Mr Excel. http://www.mrexcel.com/forum/showthread.php?t=494381
    I will update both threads with sucessful responses to try and prevent time wasting.
    Attached Images Attached Images
    Last edited by AGrace; 09-14-2010 at 05:58 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Userform help needed - matching combox value to worksheet identifiers

    Adam, with 28 posts to your profile you should know the Forum rules.

    If you choose to x-post the same question on multiple forums please have the courtesy to disclose all relevant links

    http://www.mrexcel.com/forum/showthread.php?t=494381

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Userform help needed - matching combox value to worksheet identifiers

    My apologies, I was trying to broaden my queries visibility but had forgotten to link the other post. Please feel free to delete this post as it's in violation of the forum rules.

    Sorry again.

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

    Re: Userform help needed - matching combox value to worksheet identifiers

    Just add the link to the other question
    Hope that helps.

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

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Userform help needed - matching combox value to worksheet identifiers

    I've now changed the userform slightly. The Slot combobox is populated by the slot range on the sheet1 (calculator).

    All I really need help with is tell the user form to see the value in the combobox, where that value is on the worksheet and then insert the other combobox values, offset slightly so that they're entered into the correct columns (B11, D11 and F11).

    If someone would be as kind as to showing/telling me how to do that, I'll do my best to cobble the rest together.

    Cheers

    FYI - This same new request was asked on the original post on Mr Excel.

    http://www.mrexcel.com/forum/showthr...71#post2441371

    I am going to keep both updated.

  6. #6
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Userform help needed - matching combox value to worksheet identifiers

    Hi all,

    This was answered successfully on the original post on Mr Excel.

    Quote Originally Posted by snowblizz View Post
    I think you should be able to use the Find method. Something like this which is loosely based on the helpfile's example.

    Please Login or Register  to view this content.
    I have also added a small query to the original question (below).

    Thank you so much Snowblizz! That worked marvelously. I've now altered that slightly so that the Durations "Add" buttons work in the same manner!

    There's one thing I've noticed that I would ideally like to amend, and that is preventing the submit button from functioning if any of the Comboboxes are empty - to prevent the user from accidentally adding just the slot assignment or project and no test stage etc.



    Would you know what I'd need to add to your code example to get this to function this way?



    many thanks again!!

  7. #7
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Thumbs up Re: Userform help needed - matching combox value to worksheet identifiers

    This problem has now been solved.

    Quote Originally Posted by snowblizz View Post
    Depends a bit on how the form is set up. I do have a idea though.



    Disable the Submit button in its properties.



    add this sub to the userform, (and adjust to suit your controls)

    Please Login or Register  to view this content.
    and in each combobox event place a call,

    Please Login or Register  to view this content.
    at the end of the code



    this would then, hopefully, each time the user changes a value run the test and enable the button when all fields have a value.
    thanks to all who looked into this for me.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Userform help needed - matching combox value to worksheet identifiers

    or

    Please Login or Register  to view this content.
    This also disables the commandbutton if there's change in one of the comboboxes.
    Last edited by snb; 09-14-2010 at 08:12 AM.



  9. #9
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Userform help needed - matching combox value to worksheet identifiers

    Quote Originally Posted by snb View Post
    or

    Please Login or Register  to view this content.
    This also disables the commandbutton if there'a change in one of the comboboxes.
    That also works for me, and is smaller and neater :D

+ 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