Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2005, 12:37 PM
Registered User
 
Join Date: Jun 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Linked Dropdown Lists

I am tryin to have 2 in-cell dropdown lists in an excel worksheet.
The list displayed in the 2nd dropdown is dependent on the value selected in the 1st one. Also, there should be the option for user input other than the listed items.
The first dropdown is working fine, and I have clumsily linked the second list to the 1st one by means of a macro triggered by a flag value stored in another cell. But Im sure there is another better way to do this either in Excel or VB. Can anyone help me? Thanks

 
Old June 8th, 2005, 10:35 AM
Authorized User
 
Join Date: Jun 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

*laughs* Actually, I just overcame a problem very similar to this. You'll be wanting to use a Database to accomplish this most like. At least it seems the most logical approach to me. Dropdown list 1 tells Dropdown list 2 what to access.

So If DDL1 was -

Fish
Dog
Cat

And DDL2 would list (if fish were chosen)

Salmon
Trout
Catfish

Then one way to do it is to have a database that has the Fields: Category listing 'Fish Dog Cat' as its records; Fish (Listing the fish choices); Dog (Listing the Dog Choices); and Cat (listing the Cat Choices)

If that makes any sense to you at all, I or someone else can explain/give the code to make it happen. (And if someone else has a better idea, I'm more than happy to learn :) )






Similar Threads
Thread Thread Starter Forum Replies Last Post
Linked Drop Down Lists contagiouss_blue Excel VBA 6 June 8th, 2005 09:02 AM
linked lists vs collections jfancy Pro VB.NET 2002/2003 2 June 29th, 2004 10:04 PM
Doubly Linked Lists gbilios C++ Programming 2 May 13th, 2004 10:49 PM
2 tables and 2 dropdown lists collie Classic ASP Databases 0 October 20th, 2003 07:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.