#1   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


I have a dropdown menu in cell A21 called 'equip'.
Cell B21 has dropdown menu's dependant on A21
=INDIRECT(SUBSTITUTE(A21," ","")).
This works fine.

I have generated a UserForm with two ComboBoxes on it, 1 & 2.
ComboBox1 has the same dropdown menu that cell A21 has, and works
fine.
I want ComboBox2 to have dropdown menus like cell B21 but to be
dependant on ComboBox1.
How do I program ComboBox2 to do this.
I assume it's something to do with RowSource but dont know how to do
it.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

You could use this

Private Sub ComboBox2_DropButtonClick()
Me.ComboBox2.RowSource = Range(Replace(ComboBox1.Value, " ",
"")).Address
End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

I have a dropdown menu in cell A21 called 'equip'.
Cell B21 has dropdown menu's dependant on A21
=INDIRECT(SUBSTITUTE(A21," ","")).
This works fine.

I have generated a UserForm with two ComboBoxes on it, 1 & 2.
ComboBox1 has the same dropdown menu that cell A21 has, and works
fine.
I want ComboBox2 to have dropdown menus like cell B21 but to be
dependant on ComboBox1.
How do I program ComboBox2 to do this.
I assume it's something to do with RowSource but dont know how to do
it.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



  #3   Report Post  
Posted to microsoft.public.excel.misc
L Scholes
 
Posts: n/a
Default UserForm

If I'm going to use this code for my list, where do I enter the raw
data that should be available in ComboBox2 in relation to the data
available to ComboBox1? (I hope I said that right.)

  #4   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


Have tried your suggestion but the syntax stays highlighted in red and
dos'nt seem to do anything to ComboBox2.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #5   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

NG wrap-around. Try

Private Sub ComboBox2_DropButtonClick()
Me.ComboBox2.RowSource = Range(Replace( _
ComboBox1.Value, " ", "")).Address
End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

Have tried your suggestion but the syntax stays highlighted in red and
dos'nt seem to do anything to ComboBox2.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462





  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

This is a set of named ranges.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"L Scholes" wrote in message
ups.com...
If I'm going to use this code for my list, where do I enter the raw
data that should be available in ComboBox2 in relation to the data
available to ComboBox1? (I hope I said that right.)



  #7   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


Have cured the wrap around problem OK but still don't get ComboBox 2 to
achieve the desired effect.
Do I need to anything about the Address bit at the end.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #8   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

Should be okay, but maybe try external referencing

Private Sub ComboBox2_DropButtonClick()
Me.ComboBox2.RowSource = Range(Replace( _
ComboBox1.Value, " ", "")).Address(, , , True)
End Sub


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

Have cured the wrap around problem OK but still don't get ComboBox 2 to
achieve the desired effect.
Do I need to anything about the Address bit at the end.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



  #9   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


Have tried your suggestion but still just have an empty dropdown box for
ComboBox2.
Sorry to be a pain.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #10   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

Can you post your workbook somewhere on the web? www.cjoint.com has a free
hosting service.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

Have tried your suggestion but still just have an empty dropdown box for
ComboBox2.
Sorry to be a pain.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462





  #11   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


Workbook is over 20Mb in size.
Wish CJoint was in English.

I'm sure someone out there can solve my problem, have lots of faith.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #12   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

What I gave you works, I tried it several times to make sure. Can you not
pare the workbook down to demonstrate the problem.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

Workbook is over 20Mb in size.
Wish CJoint was in English.

I'm sure someone out there can solve my problem, have lots of faith.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



  #13   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


I have written a small Workbook that demonstrates my problem. How can I
get it to you??


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462

  #14   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

Post it at cJoint. It is in French, but the first box has a button called
Browse beside it. Click that and browse to your file, then click the Créer
le lien Cjoint button.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

I have written a small Workbook that demonstrates my problem. How can I
get it to you??


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



  #15   Report Post  
Posted to microsoft.public.excel.misc
grahammal
 
Posts: n/a
Default UserForm


Have resolved most of the problem now with your help, the only bit it
dos'nt like now is the word 'Replace'.
If I use
Me.ComboBox2.RowSource = Range(ComboBox1.Value).Address(, , , True)
It works fine but of cause I do need the 'Replace' option or an
equivelant to
take care of the range names with spaces in them.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile: http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



  #16   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default UserForm

Long-shot perhaps. In the VBIDE, goto ToolsReferences, and see if any items
are flagged as MISSING. If so, uncheck it.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"grahammal" wrote
in message ...

Have resolved most of the problem now with your help, the only bit it
dos'nt like now is the word 'Replace'.
If I use
Me.ComboBox2.RowSource = Range(ComboBox1.Value).Address(, , , True)
It works fine but of cause I do need the 'Replace' option or an
equivelant to
take care of the range names with spaces in them.


--
grahammal
------------------------------------------------------------------------
grahammal's Profile:

http://www.excelforum.com/member.php...o&userid=20336
View this thread: http://www.excelforum.com/showthread...hreadid=531462



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
userform that add data in all w/sheets tkraju via OfficeKB.com Excel Discussion (Misc queries) 0 March 24th 06 04:29 AM
Userform Jeff Excel Discussion (Misc queries) 0 February 6th 06 09:30 PM
Data Validation Cell - Move to UserForm thom hoyle Excel Worksheet Functions 0 April 28th 05 12:23 AM
Cell Content from UserForm Not Retained D.Parker Excel Discussion (Misc queries) 3 April 27th 05 04:56 PM
How can I run a macro in the background whilst a UserForm is visib cdb Excel Discussion (Misc queries) 3 February 10th 05 06:58 PM


All times are GMT +1. The time now is 09:39 AM.

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

About Us

"It's about Microsoft Excel"