Userform help needed - matching combox value to worksheet identifiers

AGrace

Board Regular
Joined
Jun 29, 2010
Messages
150
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.

NewPicture13.jpg


As you can see from the image above, 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
 
Trying to take a more unified view I think the following is code you should possibly be having in the userform, hopefully it works together
It is possible that the _Change is not the correct event to use as a trigger

Code:
Private Sub TestStageBox_Change()
Call enableSubmit
End Sub
Private Sub ProjectBox_Change()
Call enableSubmit
End Sub
Private Sub WorkSlotBox_Change()
Call enableSubmit
End Sub
Sub enableSubmit()
If WorkSlotBox.Value <> "" And ProjectBox.Value <> "" And TestStageBox.Value <> "" Then
SubmitBtn.Enabled = True
End If
End Sub
Private Sub SubmitBtn_Click()
'this is where you place the code for copying values to the sheet
End Sub

Private Sub UserForm_Activate()
'runs each time the form is activated, disable the submit button
SubmitBtn.Enabled = False
End Sub

Private Sub UserForm_Deactivate()
'empties the user filled boxes when the form is deactivated
WorkSlotBox.Value = ""
ProjectBox.Value = ""
TestStageBox.Value = ""
End Sub
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,948
Messages
6,122,420
Members
449,083
Latest member
Ava19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top