+ Reply to Thread
Results 1 to 3 of 3

My Dependent Combo boxes are not pulling the range - Help!

  1. #1
    Registered User
    Join Date
    05-13-2015
    Location
    Hartford, CT
    MS-Off Ver
    Excel 10
    Posts
    2

    Talking My Dependent Combo boxes are not pulling the range - Help!

    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]

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: My Dependent Combo boxes are not pulling the range - Help!

    See if this article can help you out. It's a different approach: http://www.utteraccess.com/wiki/inde...ists_%28VBA%29.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: My Dependent Combo boxes are not pulling the range - Help!

    Try this code as a replacement

    Please Login or Register  to view this content.
    HTH,
    Maud

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Dependent Combo Boxes
    By VaibhavAr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2016, 07:16 AM
  2. [SOLVED] Cascading/dependent combo boxes
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-25-2015, 10:17 AM
  3. dependent combo boxes
    By juandc in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-17-2014, 09:53 AM
  4. Help, dependent combo boxes or droplists
    By jomacho in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 05:18 PM
  5. VBA for Dependent Combo Boxes
    By Ansar Hussain in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-07-2011, 11:32 AM
  6. Dependent Combo Boxes
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-06-2011, 08:10 AM
  7. dependent combo boxes
    By rvc81 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2011, 03:47 PM

Tags for this Thread

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