Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Post Dynamic Combo Box

I really need help on creating a Dynamic Combo Box, please.

There are two Combo Boxes in my spreadsheet. The first one is called "drop down 2" which has two options "Investment" or "Withheld". Basically, when user chooses "Investment" in the first combo box, the second combo box will appear to have choices between "High" or "Low". On the other hand, if the user chooses "Withheld" on the first combo box, the second combo box will then have choices between "One" or "Two".

I have spent ages on getting this to work, but I am still struggling, this is my work so far.

Sub Deduct()
'shows user dropdown2 results
If DropDown2.Value = "Investment" Then
dropdown4.Visible = True
dropdown4.ListFillRange = "c3:c4"
Else
If DropDown2 = "Withheld" Then
dropdown4.Visible = "c6:c7"
End If
End If
End Sub

I can't spot any errors in it myself, probably because I am only a new user in excel. But the following message came popping up,:

Runtime error '424':
Object Required

I don't understand? What kind of objects are required? Can you spot my error?
  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

Consider using data validation instead, and take a look at this site for
guidance

http://www.contextures.com/xlDataVal02.html




"benjarfer" wrote:


I really need help on creating a Dynamic Combo Box, please.

There are two Combo Boxes in my spreadsheet. The first one is called
"drop down 2" which has two options "Investment" or "Withheld".
Basically, when user chooses "Investment" in the first combo box, the
second combo box will appear to have choices between "High" or "Low".
On the other hand, if the user chooses "Withheld" on the first combo
box, the second combo box will then have choices between "One" or
"Two".

I have spent ages on getting this to work, but I am still struggling,
this is my work so far.

Sub Deduct()
'shows user dropdown2 results
If DropDown2.Value = "Investment" Then
dropdown4.Visible = True
dropdown4.ListFillRange = "c3:c4"
Else
If DropDown2 = "Withheld" Then
dropdown4.Visible = "c6:c7"
End If
End If
End Sub

I can't spot any errors in it myself, probably because I am only a new
user in excel. But the following message came popping up,:

Runtime error '424':
Object Required

I don't understand? What kind of objects are required? Can you spot my
error?


--
benjarfer

  #3   Report Post  
º¼ÖÝÈË
 
Posts: n/a
Default


"benjarfer" дÈëÓʼþ
...

I really need help on creating a Dynamic Combo Box, please.

There are two Combo Boxes in my spreadsheet. The first one is called
"drop down 2" which has two options "Investment" or "Withheld".
Basically, when user chooses "Investment" in the first combo box, the
second combo box will appear to have choices between "High" or "Low".
On the other hand, if the user chooses "Withheld" on the first combo
box, the second combo box will then have choices between "One" or
"Two".

I have spent ages on getting this to work, but I am still struggling,
this is my work so far.

Sub Deduct()
'shows user dropdown2 results
If DropDown2.Value = "Investment" Then
dropdown4.Visible = True
dropdown4.ListFillRange = "c3:c4"
Else
If DropDown2 = "Withheld" Then
dropdown4.Visible = "c6:c7"
End If
End If
End Sub

I can't spot any errors in it myself, probably because I am only a new
user in excel. But the following message came popping up,:

Runtime error '424':
Object Required

I don't understand? What kind of objects are required? Can you spot my
error?


--
benjarfer





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
Can't create dynamic charts Brian Sells Charts and Charting in Excel 7 March 22nd 05 05:23 AM
connecting combo boxes to yield data in another cell. TxN8tv Excel Discussion (Misc queries) 0 March 14th 05 05:07 PM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 1 February 16th 05 03:05 AM
"Combo Box - getting control combo box to stick in place in worksh ajr Excel Discussion (Misc queries) 0 February 15th 05 08:45 PM
dynamic combo boxes tjb Excel Worksheet Functions 2 January 25th 05 08:33 PM


All times are GMT +1. The time now is 08:19 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"