Complicated Combobox sequence: Dependent comboboxes and return value to cell.

JaredMcCullough

Well-known Member
Joined
Aug 1, 2011
Messages
516
The intentions are to have the two comboboxes provide the location to return the value of a textbox. The user enters there name in the textbox, select there approval level, and submit which returns to the appropriate spot.

Current Controls: Userform1, Combobox1, Combobox2, Textbox1, Textbox2, Commandbutton1
Worksheet Information: ID = Column A, Type = Column E, Approval 1 = Column Q, Approval 2 = Column R, Approval 3 = Column S, Approval 4 = Column T

Current Code:

Combobox1 pulls in the ID number from column A of a worksheet. Which then populates a critical value (Type) for later in the code in Textbox1.
Code:
Private Sub UserForm_Initialize()

Dim Rng As Range
Dim con As Control
Set Rng = Sheets("Variance Database").Range("A7:A" & Sheets("Variance Database").Range("A" & Rows.Count).End(xlUp).Row).Find(Me.ComboBox1.Value)

    With Worksheets("Variance Database")
        ComboBox1.List = .Range("A8", .Range("A" & Rows.Count).End(xlUp)).Value
    End With

    If Not Rng Is Nothing Then
       Rng.Offset(, 4).Value = Me.TextBox1.Value
    End If

End Sub

The next step would be to have the above code to populate Combobox2 with the "Approval Levels" (see above for approvals and their associated columns) based upon if the row (from combobox1) currenlty maintains a value. If has it HAS a value under the approval level then ingore or DONT put in the Combobox2 . If it DOES NOT have a value then put the Approval term (ex. "Approval 1" if no value in column Q) in combobox2.

The user will then select the available approval level from Combobox2 and type there name in Textbox2.

The final step would be to have commandbutton1 return the value to the chosen "Approval Column" of the row indicated by Combobox1


I would greatly appreciate anyone who is willing to help with this portion of my project as it is nearing completion and I am stuck on just a few last pieces.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Forum statistics

Threads
1,214,982
Messages
6,122,573
Members
449,089
Latest member
Motoracer88

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