Results 1 to 14 of 14

Linking Drop Down Lists and Check Boxes

Threaded View

magnilan Linking Drop Down Lists and... 08-14-2013, 12:25 AM
ajryan88 Re: Linking Drop Down Lists... 08-14-2013, 04:35 AM
magnilan Re: Linking Drop Down Lists... 08-14-2013, 11:49 PM
ajryan88 Re: Linking Drop Down Lists... 08-14-2013, 11:52 PM
magnilan Re: Linking Drop Down Lists... 08-15-2013, 02:41 AM
magnilan Re: Linking Drop Down Lists... 08-15-2013, 05:11 AM
ajryan88 Re: Linking Drop Down Lists... 08-15-2013, 08:00 AM
magnilan Re: Linking Drop Down Lists... 08-15-2013, 09:53 AM
ajryan88 Re: Linking Drop Down Lists... 08-15-2013, 04:43 PM
magnilan Re: Linking Drop Down Lists... 08-15-2013, 10:16 PM
ajryan88 Re: Linking Drop Down Lists... 08-15-2013, 10:18 PM
magnilan Re: Linking Drop Down Lists... 10-29-2013, 01:22 PM
magnilan Re: Linking Drop Down Lists... 10-29-2013, 01:14 PM
magnilan Re: Linking Drop Down Lists... 10-30-2013, 08:57 AM
  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    53

    Linking Drop Down Lists and Check Boxes

    Hi everyone, I was recently tasked to create a program for work and it was recommended to me that VBA would serve my purpose very well. Problem is, I don't have a programming background and have had no experience with VBA before this. I have relied heavily on google and ready made templates to help me but I am stumped on two aspects.

    1) I need to link two or more drop down list together so that one selection will give different options in the next list (common question, I know but I can't get it to work...) and,

    2) I need to create a link between a drop down list and check boxes. What happens is that by choosing and option in the drop down list, a selection pane will change to a checklist where I can mark the options I want.

    All the information that is entered in the userform will then be updated into a descending list, with the checked options mentioned above placed into a single cell on an excel worksheet. I will include my code and a shot of the userform.

    Private Sub CancelButton1_Click()
    
    Unload Me
    
    End Sub
    
    Private Sub ClearButton_Click()
    
    Call UserForm_Initialize
    
    End Sub
    
    Private Sub OKButton_Click()
    
    Dim emptyRow As Long
    
    'Make Summary Active
    Sheets(2).Activate
    
    'Determine EmptyRow
    emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
    
    'Export Data to worksheet
    Cells(emptyRow, 1).Value = OperatorName.Value
    Cells(emptyRow, 2).Value = Time.Value
    Cells(emptyRow, 3).Value = Region.Value
    Cells(emptyRow, 4).Value = Location.Value
    Cells(emptyRow, 5).Value = Reference.Value
    Cells(emptyRow, 6).Value = EmployeeNo.Value
    Cells(emptyRow, 7).Value = DutyType.Value
    Cells(emptyRow, 8).Value = TaskCategory.Value
    Cells(emptyRow, 9).Value = Comments
    
    Unload Me
    
    End Sub
    
    
    
    Private Sub UserForm_Initialize()
    
    'Empty OperatorName
    OperatorName.Value = ""
    
    'Empty Time
    Time.Value = ""
    
    'Empty Reference
    Reference.Value = ""
    
    'Empty Region
    Region.Value = ""
    
    'Fill Region
    With Region
        .AddItem "1"
        .AddItem "2"
        .AddItem "3"
    End With
    
    'Empty Location
    Location.Value = ""
    
    'Empty EmployeeNo
    EmployeeNo.Value = ""
    
    'Empty Comments
    Comments.Value = ""
    
    'Empty DutyType
    DutyType.Clear
    
    'Fill DutyType
    With DutyType
        .AddItem "FL"
        .AddItem "M"
        .AddItem "FR"
        .AddItem "X"
    End With
    
    'Empty TaskCategory
    TaskCategory.Clear
    
    'Set Focus on OperatorName
    OperatorName.SetFocus
    
    End Sub
    I have included my sample excel file to those who wish to take a look, many of you will undoubtedly notice that I have copied a template wholesale for it. I am hoping to link region and location tabs so that I may populate the location list based on a selection from the region list. As for the check boxes, I am hoping to replace the Task Category list with it as I need to choose multiple options. Any help or suggestions is really appreciated. However, please bear in mind that I am a beginner in this so easy to understand advice is best. Thanks you very much!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using check boxes to hide and un-hide rows with drop down lists within rows
    By Sparky_Chris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2012, 07:22 AM
  2. Check boxes and linking
    By stealtharsenal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-01-2012, 12:35 PM
  3. Linking Check Boxes
    By Willmd in forum Excel General
    Replies: 0
    Last Post: 07-06-2011, 02:52 PM
  4. Linking Cells with Check Boxes
    By dandavis1 in forum Excel General
    Replies: 5
    Last Post: 06-03-2010, 08:33 AM
  5. Linking drop down boxes
    By Anthony J. in forum Excel General
    Replies: 20
    Last Post: 05-28-2009, 12:18 PM

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