Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ynissel
 
Posts: n/a
Default Control Box - Please help !

I have a combo box whose list fill range is linked to a specific range. My
issue is -that based on some other criteria - the list should be 5 or 10
numbers. How can I get the combobox to understand that this should be
dynamic to the other variable ?

ie - if program = A then the drop down list should be 1,2,3,4,5 {actually
cells a1..a5} else the list should be 1,2,3,4,5,6,7,8,9,10 {cells a1..a10}?

Thanks,
yosef
  #2   Report Post  
Oblik
 
Posts: n/a
Default

Hi ynissel

Private Sub ComboBox1_GotFocus()
If Range("d1").Value = "a" Then
ComboBox1.ListFillRange = "a1:a5"
Else: ComboBox1.ListFillRange = "a1:a10"
End If
End Sub

pls take note of the first line - its about _gotfocus, and not _click




"ynissel" wrote:

I have a combo box whose list fill range is linked to a specific range. My
issue is -that based on some other criteria - the list should be 5 or 10
numbers. How can I get the combobox to understand that this should be
dynamic to the other variable ?

ie - if program = A then the drop down list should be 1,2,3,4,5 {actually
cells a1..a5} else the list should be 1,2,3,4,5,6,7,8,9,10 {cells a1..a10}?

Thanks,
yosef

  #3   Report Post  
ynissel
 
Posts: n/a
Default

Thanks.
This is what I currently have in there
Private Sub ComboBox3_Change()
ComboBox3.Value = Format(ComboBox3.Value, "0.000%")
End Sub

Since Im not a programmer - where would I copy your text into ?
Thanks agian.
Yosef


"Oblik" wrote:

Hi ynissel

Private Sub ComboBox1_GotFocus()
If Range("d1").Value = "a" Then
ComboBox1.ListFillRange = "a1:a5"
Else: ComboBox1.ListFillRange = "a1:a10"
End If
End Sub

pls take note of the first line - its about _gotfocus, and not _click




"ynissel" wrote:

I have a combo box whose list fill range is linked to a specific range. My
issue is -that based on some other criteria - the list should be 5 or 10
numbers. How can I get the combobox to understand that this should be
dynamic to the other variable ?

ie - if program = A then the drop down list should be 1,2,3,4,5 {actually
cells a1..a5} else the list should be 1,2,3,4,5,6,7,8,9,10 {cells a1..a10}?

Thanks,
yosef

  #4   Report Post  
Posted to microsoft.public.excel.misc
ynissel
 
Posts: n/a
Default Control Box - Please help !

I sent this out as a sperate message but realized I should have replied here.
I added a second if statement and its not working can you troubleshppt for
me ?
Thanks,
Yosef
Private Sub ComboBox1_GotFocus()
If Range("d1").Value = "a" Then
ComboBox1.ListFillRange = "a1:a5"
If Range("d1").Value = "b" Then
ComboBox1.ListFillRange = "a1:a15"
Else: ComboBox1.ListFillRange = "a1:a10"
End If
End If
End Sub

Thanks,
Yosef


"Oblik" wrote:

Hi ynissel

Private Sub ComboBox1_GotFocus()
If Range("d1").Value = "a" Then
ComboBox1.ListFillRange = "a1:a5"
Else: ComboBox1.ListFillRange = "a1:a10"
End If
End Sub

pls take note of the first line - its about _gotfocus, and not _click




"ynissel" wrote:

I have a combo box whose list fill range is linked to a specific range. My
issue is -that based on some other criteria - the list should be 5 or 10
numbers. How can I get the combobox to understand that this should be
dynamic to the other variable ?

ie - if program = A then the drop down list should be 1,2,3,4,5 {actually
cells a1..a5} else the list should be 1,2,3,4,5,6,7,8,9,10 {cells a1..a10}?

Thanks,
yosef

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
How to insert date using a pop up calendar control in a cell i Iain the scout Excel Discussion (Misc queries) 4 December 17th 05 08:10 PM
API for MS Chart Control bill Charts and Charting in Excel 1 September 12th 05 07:00 PM
Tab to an ActiveX control? Karin Excel Discussion (Misc queries) 0 July 6th 05 05:08 AM
Variable control tip text Steve Excel Discussion (Misc queries) 3 June 30th 05 03:48 PM
Copying list-box control Excel Discussion (Misc queries) 1 January 6th 05 01:39 AM


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