Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-24-2014, 08:42 AM
jpb103's Avatar
jpb103 jpb103 is offline Using drop down boxes to access different data Windows 7 64bit Using drop down boxes to access different data Office 2007
Advanced Beginner
 
Join Date: May 2014
Location: Thunder Bay, Ontario
Posts: 58
jpb103 is on a distinguished road
Default

I would use a couple of comboboxes for this. I'd name the first one ComboTeam and the second one ComboPlayers. Then you just need to do some coding in the ComboTeam_Change() sub (it executes the code in this section each time a team is selected). The code would consist of a Select case statement something like this:
Code:
Private Sub ComboTeam_Change()
ComboPlayers.Clear
Select Case ComboTeam.Text
    Case "Swansea"
        ComboPlayers.AddItem "SwanseaPlayerName1"
        ComboPlayers.Additem "SwanseaPlayerName2"
        ...
    Case "Man United"
        ComboPlayers.AddItem "ManUnitedPlayerName1"
        ...
    Case Else
        ComboPlayers.AddItem "Please select a valid team"
End Select
End Sub
Alternatively, and instead of manually coding each player name like this, you could put each player list into text files and load them into an array.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
excel drop down boxes kaschlegel Excel 1 07-22-2013 10:23 PM
Using drop down boxes to access different data Changing the placeholder text for drop down boxes DeadBatteries Word 1 08-24-2012 09:09 AM
Using drop down boxes to access different data Data Validation drop down rkalapura Excel 1 05-27-2012 02:23 AM
Using drop down boxes to access different data Dynamically creating new drop down boxes. dmncs Word VBA 1 05-06-2012 09:29 PM
Using drop down boxes to access different data Drop Down Boxes Thomas Farmery Word 7 01-05-2011 01:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft