Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
i have a collection (this contains names from a list) ================================================== ===== it is used in a number of comboboxes ================================================== ===== if a selection is made from the list can it do this? = for the record selected, input the data from combobox1 into column "AX" and the data from textbox (this will depend on which combobox is being used) into column "AY" = remove the record selected from the collection ================================================== ===== if a blank selection is made (existing record changed) = for the record that was already in the combobox the date in column "AX" needs to return to blank, and time in column "AY" needs to return to blank = the record then needs to return to the collection for selection in another combobox ================================================== ===== if anyone has any queries or would like to let me know that they are trying to help, please e-mail me at Thank you, Robert Couchman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Robert,
Here's a starter for 10 Dim prevIndex As Long Private Sub ComboBox1_Change() If ComboBox1.Value = "" Then Range("AX1").Value = "" Range("AY1").Value = "" myColl.Add ComboBox1.List(prevIndex), ComboBox1.List(prevIndex) Else Range("AX1").Value = ComboBox1.Value Range("AY1").Value = TextBox1.Value myColl.Remove ComboBox1.List(prevIndex) prevIndex = ComboBox1.ListIndex End If End Sub Private Sub UserForm_Activate() ComboBox1.ListIndex = 0 End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Robert Couchman" wrote in message ... Hello all, i have a collection (this contains names from a list) ================================================== ===== it is used in a number of comboboxes ================================================== ===== if a selection is made from the list can it do this? = for the record selected, input the data from combobox1 into column "AX" and the data from textbox (this will depend on which combobox is being used) into column "AY" = remove the record selected from the collection ================================================== ===== if a blank selection is made (existing record changed) = for the record that was already in the combobox the date in column "AX" needs to return to blank, and time in column "AY" needs to return to blank = the record then needs to return to the collection for selection in another combobox ================================================== ===== if anyone has any queries or would like to let me know that they are trying to help, please e-mail me at Thank you, Robert Couchman |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|