Hi! I'm new to the forum and to VBA. Here's my story!
I have 3 combo boxes on a worksheet called Statutory Flow Sheet.
State
FilingType
Attachment1
I'm also using a worksheet in the same workbook for Data Validation (name).
I'm using named ranges for just about everything.
State Combo box uses a regular fill range pointing to the named range of "State".
I want the FilingType combo box to point to a range dependent on the state.
Dilemma 1 - the named range I want it to point to is this = first 2 letters from state combo box & "FilingTypeUnique". I have the range already created.
Dilemma 2 - once FilingType combo box is pointing to the correct range and I make a selection, I need the Attachment1 combo box to be dependent on that and point to this range = first 2 letters from state combo box & "Attachments" & the value from the FilingType combo box.
Below is the code I have. I know I'm missing stuff! Any guidance would be helpful! FYI - I did try listfillrange and didn't get the result I need. I also need this to not bog down the sheet. This is for a production environment.
[CODE][/Private Sub State_Change()
Dim FilingTypeRangeName As String
FilingTypeRangeName = "=" & Left(State, 2) & "FilingTypeUnique"
ComboBox.FilingType.RowSource = FilingTypeRangeName
End Sub
Private Sub FilingType_Change()
Dim AttachmentRangeName As String
AttachmentRangeName = "=" & FilingTypeRangeName & FilingType
ComboBox.Attachment1.RowSource = AttachmentRangeName
End Sub
CODE]
Bookmarks