Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default controlling a form drop down based on selection of another drop down


I've got a form that has a selection of drop downs - I'd like one of the
drop down later on in the form to be controlled by what a user selects
in the first drop down - e.g. the first drop down has A, B, C, D, E to
select from - if they select A I'd like the later drop down to show
certain list, if they select B I'd like it to show a different list and
so on. Is this possible? Many, many thanks as ever!


--
flurry
------------------------------------------------------------------------
flurry's Profile: http://www.excelforum.com/member.php...o&userid=34303
View this thread: http://www.excelforum.com/showthread...hreadid=548596

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default controlling a form drop down based on selection of another drop down


If you have a dynamic range in the workbook, whose size relates to the
value of the first combobox
e.g. on Sheet1
column A|column B
A Ai
A Aii
A Aiii
B Bi
B Bii
C Ci
C Cii
C Ciii
etc whatever...

and C1 is linked to CombBox1.ControlSource
with a named range "MyRange"
=OFFSET(Sheet1!$B$1,MATCH(Sheet1!$C$1,Sheet1!$A:$A ,0)-1,0,COUNTIF(Sheet1!$A:$A,Sheet1!$C$1),1)

Then put something like this in the the _enter event of ComboBox2 or
_exit event of ComboBox1

ComboBox2.Clear
if thisworkbook.sheets("Sheet1").range("C1").value<e mpty then
for each c in thisworkbook.sheets("Sheet1").range("MyRange")
ComboBox2.additem (c.value)
next


You'll probably need to tweak it a little...
Col


--
colofnature
------------------------------------------------------------------------
colofnature's Profile: http://www.excelforum.com/member.php...o&userid=34356
View this thread: http://www.excelforum.com/showthread...hreadid=548596

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell value based on selection from drop box Esra[_4_] Excel Worksheet Functions 3 May 31st 09 06:52 AM
count based on selection from drop down list lovejunkie02 Excel Worksheet Functions 2 September 21st 07 10:04 PM
Hide row(s) based on drop down selection Maritza Excel Discussion (Misc queries) 6 March 12th 07 09:56 PM
Change row colour based on the drop down selection Sathya Nallapeta Excel Discussion (Misc queries) 1 January 4th 07 11:12 PM
Drop Down Lists - assign a value based on selection Neil M Excel Worksheet Functions 6 November 19th 05 03:25 PM


All times are GMT +1. The time now is 12:05 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"