Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I've got a userform in wich i've got a several listboxes of values you can choose from, these values are coming from several lists (lets say; A1:A100 for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i would like is that when I choose a value in listbox 1 that this value is not longer available is this listbox, turns grey or something like that, so that it cannot be choosen a second time. For listbox 2 I would like the following, the contents of this listbox are being used to fill out columns F and G. Listbox 2 contains a number sequence (0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only octals). So if number 77 is used to fill out column F and number 300 is used to fill out column G, I would like to see not only these two numbers turn grey, but also the numbers in between. Any ideas? Paul |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nigel,
Thanks for your reply. How can I make, that removing items by reference to their index number, happen? Cheers, Paul "Nigel" wrote: You cannot selectively change the color of items in a ListBox. You can remove items by reference to there index number. -- Regards, Nigel "Paul Tikken" wrote in message ... Hi, I've got a userform in wich i've got a several listboxes of values you can choose from, these values are coming from several lists (lets say; A1:A100 for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i would like is that when I choose a value in listbox 1 that this value is not longer available is this listbox, turns grey or something like that, so that it cannot be choosen a second time. For listbox 2 I would like the following, the contents of this listbox are being used to fill out columns F and G. Listbox 2 contains a number sequence (0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only octals). So if number 77 is used to fill out column F and number 300 is used to fill out column G, I would like to see not only these two numbers turn grey, but also the numbers in between. Any ideas? Paul |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub ComboBox1_Change()
With ComboBox1 If .ListIndex = 0 Then .RemoveItem .ListIndex .ListIndex = -1 End If End With End Sub The above only works if the control is not bound, in other words the list is loaded into the control. Not by using the Control Source property -- Regards, Nigel "Paul Tikken" wrote in message ... Nigel, Thanks for your reply. How can I make, that removing items by reference to their index number, happen? Cheers, Paul "Nigel" wrote: You cannot selectively change the color of items in a ListBox. You can remove items by reference to there index number. -- Regards, Nigel "Paul Tikken" wrote in message ... Hi, I've got a userform in wich i've got a several listboxes of values you can choose from, these values are coming from several lists (lets say; A1:A100 for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i would like is that when I choose a value in listbox 1 that this value is not longer available is this listbox, turns grey or something like that, so that it cannot be choosen a second time. For listbox 2 I would like the following, the contents of this listbox are being used to fill out columns F and G. Listbox 2 contains a number sequence (0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only octals). So if number 77 is used to fill out column F and number 300 is used to fill out column G, I would like to see not only these two numbers turn grey, but also the numbers in between. Any ideas? Paul |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Nigel works like a charm!
Sorry for the late response, been away for a while!! cheers, Paul "Nigel" wrote: Private Sub ComboBox1_Change() With ComboBox1 If .ListIndex = 0 Then .RemoveItem .ListIndex .ListIndex = -1 End If End With End Sub The above only works if the control is not bound, in other words the list is loaded into the control. Not by using the Control Source property -- Regards, Nigel "Paul Tikken" wrote in message ... Nigel, Thanks for your reply. How can I make, that removing items by reference to their index number, happen? Cheers, Paul "Nigel" wrote: You cannot selectively change the color of items in a ListBox. You can remove items by reference to there index number. -- Regards, Nigel "Paul Tikken" wrote in message ... Hi, I've got a userform in wich i've got a several listboxes of values you can choose from, these values are coming from several lists (lets say; A1:A100 for listbox 1 C1:C100 for listbox 2) in a worksheet(SHEET1). What i would like is that when I choose a value in listbox 1 that this value is not longer available is this listbox, turns grey or something like that, so that it cannot be choosen a second time. For listbox 2 I would like the following, the contents of this listbox are being used to fill out columns F and G. Listbox 2 contains a number sequence (0, 77, 100, 177, 200, 277, 300, 377, 400, 477, 500 etc, so only octals). So if number 77 is used to fill out column F and number 300 is used to fill out column G, I would like to see not only these two numbers turn grey, but also the numbers in between. Any ideas? Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there an easy Copy/Paste of a Userform ? (Entire Userform Including tx & cbx's) | Excel Programming | |||
Userform to enter values and shown in same userform in list | Excel Programming | |||
Looping procedure calls userform; how to exit loop (via userform button)? | Excel Programming | |||
Activating userform and filling it with data form row where userform is activate | Excel Programming | |||
Access from add_in userform to main template userform.... | Excel Programming |