#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Combo Boxes

I am tring to use a combo box to select 1 of 5 specific
list fill ranges that I have defined in another
spreadsheet. Can someone help me out with how I do this.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Boxes

by defined, do you mean insert=Name=Define

Just load the 5 names in the combobox as strings

Then when the selection is made, use the value of the combobox to assign the
listfillrange of another combobox (assume that is what you want to do)

Me.Combobox2.ListFillRange =
worksheets("Data").Range(Me.combobox1.Value).Addre ss(external:=True)

Note that there are 3 different types of comboboxes (2 of which have a
listfillrange property). It is best to state what controls you are working
with.

--
Regards,
Tom Ogilvy


Scot Rundell wrote in message
...
I am tring to use a combo box to select 1 of 5 specific
list fill ranges that I have defined in another
spreadsheet. Can someone help me out with how I do this.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Combo Boxes

Thanks for the help, but this is what I ended up using....
Select Case ComboBox4.Value
Case "VIC/TAS"
ComboBox5.ListFillRange = "Branch_Name_VIC"
ComboBox2.ListFillRange = "Estimator_VIC"
Case "QLD"
ComboBox5.ListFillRange = "Branch_Name_QLD"
ComboBox2.ListFillRange = "Estimator_QLD"
End Select

Regards,
Scot Rundell



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Boxes

Combobox5.ListFillRange = "Branch_Name_" & left(Combobox4.Value,3)
ComboBox2.ListFillRange = "Estimator_" & Left(combobox4.Value,3)

would be simpler if you set up your names to correspond.

If you didn't, then you can go ahead and use redundant code.

--
Regards,
Tom Ogilvy



Scot Rundell wrote in message
...
Thanks for the help, but this is what I ended up using....
Select Case ComboBox4.Value
Case "VIC/TAS"
ComboBox5.ListFillRange = "Branch_Name_VIC"
ComboBox2.ListFillRange = "Estimator_VIC"
Case "QLD"
ComboBox5.ListFillRange = "Branch_Name_QLD"
ComboBox2.ListFillRange = "Estimator_QLD"
End Select

Regards,
Scot Rundell



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Combo Boxes


-----Original Message-----
Combobox5.ListFillRange = "Branch_Name_" & left

(Combobox4.Value,3)
ComboBox2.ListFillRange = "Estimator_" & Left

(combobox4.Value,3)

would be simpler if you set up your names to correspond.

If you didn't, then you can go ahead and use redundant

code.

--
Regards,
Tom Ogilvy



Scot Rundell wrote in

message
...
Thanks for the help, but this is what I ended up

using....
Select Case ComboBox4.Value
Case "VIC/TAS"
ComboBox5.ListFillRange = "Branch_Name_VIC"
ComboBox2.ListFillRange = "Estimator_VIC"
Case "QLD"
ComboBox5.ListFillRange = "Branch_Name_QLD"
ComboBox2.ListFillRange = "Estimator_QLD"
End Select

Regards,
Scot Rundell



*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!



.
Is this code used inside the case statement or is it

seperate?


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Combo Boxes

You wouldn't need the case statement - it builds the defined name base on
the vlaue of combobox5


Again, this only works if the first 3 letters of each selection in the
combobox5 would build the proper defined name.


Assume the choices are in combobox 5 are

AAAAAA
BBB
CCC/DDD
EEEEE
FFF-YYY-ZZZ

then using this method, you would build names like

Branch_Name_AAA
Branch_Name_BBB
Branch_Name_CCC
Branch_Name_EEE
Branch_Name_FFF

This fit the pattern for the four names (two Combobox5 values) that you
showed. I can't guess what the other ones are, but just suggested an
approach which doesn't require a case statement with five different
conditions (if you use consistent defined names).

--
Regards,
Tom Ogilvy


"Scot Rundell" wrote in message
...

-----Original Message-----
Combobox5.ListFillRange = "Branch_Name_" & left

(Combobox4.Value,3)
ComboBox2.ListFillRange = "Estimator_" & Left

(combobox4.Value,3)

would be simpler if you set up your names to correspond.

If you didn't, then you can go ahead and use redundant

code.

--
Regards,
Tom Ogilvy



Scot Rundell wrote in

message
...
Thanks for the help, but this is what I ended up

using....
Select Case ComboBox4.Value
Case "VIC/TAS"
ComboBox5.ListFillRange = "Branch_Name_VIC"
ComboBox2.ListFillRange = "Estimator_VIC"
Case "QLD"
ComboBox5.ListFillRange = "Branch_Name_QLD"
ComboBox2.ListFillRange = "Estimator_QLD"
End Select

Regards,
Scot Rundell



*** Sent via Developersdex http://www.developersdex.com

***
Don't just participate in USENET...get rewarded for it!



.
Is this code used inside the case statement or is it

seperate?



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
Getting Combo boxes to change options based on other Combo boxes. Ancient Wolf New Users to Excel 1 March 27th 09 06:29 PM
combo boxes CDnook Excel Discussion (Misc queries) 1 February 20th 09 07:48 PM
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
Questions on combo boxes and list boxes. Marc New Users to Excel 1 March 14th 06 09:40 AM
combo boxes k Excel Programming 0 July 25th 03 11:09 AM


All times are GMT +1. The time now is 05:00 AM.

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"