Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
I have a userform with a number of tabs and each tab has a number of lines
with similar text boxes on them. The textboxes are populated by a selection from the one combo box, on the form (not on a tab). The reason for using only the one combobox and not a separate combobox for each line is because the list consists of 7,000+ items and was heavy on memory usage. I have a series of radio buttons down the side of each tab. The user selects a radio button adjacent to a line then selects from the combobox. The selected value is populated into the appropriate line on the appropriate tab. This all works well except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. I have found a similar posting to this one on another forum but unfortunately there has been no reponse (poor fellow!). Has anyone any ideas on how I can overcome this problem? Jane |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
Hi Jane
Did you try the MouseUp and KeyUp events ? HTH. Best wishes Harald "Jane" skrev i melding ... I have a userform with a number of tabs and each tab has a number of lines with similar text boxes on them. The textboxes are populated by a selection from the one combo box, on the form (not on a tab). The reason for using only the one combobox and not a separate combobox for each line is because the list consists of 7,000+ items and was heavy on memory usage. I have a series of radio buttons down the side of each tab. The user selects a radio button adjacent to a line then selects from the combobox. The selected value is populated into the appropriate line on the appropriate tab. This all works well except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. I have found a similar posting to this one on another forum but unfortunately there has been no reponse (poor fellow!). Has anyone any ideas on how I can overcome this problem? Jane |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
Private Sub ComboBox1_MouseDown(ByVal Button As Integer, _
ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Combobox1.ListIndex = -1 End Sub -- Regards, Tom Ogilvy "Jane" wrote in message ... I have a userform with a number of tabs and each tab has a number of lines with similar text boxes on them. The textboxes are populated by a selection from the one combo box, on the form (not on a tab). The reason for using only the one combobox and not a separate combobox for each line is because the list consists of 7,000+ items and was heavy on memory usage. I have a series of radio buttons down the side of each tab. The user selects a radio button adjacent to a line then selects from the combobox. The selected value is populated into the appropriate line on the appropriate tab. This all works well except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. I have found a similar posting to this one on another forum but unfortunately there has been no reponse (poor fellow!). Has anyone any ideas on how I can overcome this problem? Jane |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
Thanks Tom,
It obviously "refreshes" my combobox (removes the previous selection) through setting Listindex to -1 so forces the user to reselect an item but that's fine. So my code remains under the _Change event. I couldn't get Harald's suggestion of using MouseUp or KeyUp to detect a change in the selection - same result as using Change, BeforeUpdate etc. Kind regards, Jane "Tom Ogilvy" wrote: Private Sub ComboBox1_MouseDown(ByVal Button As Integer, _ ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single) Combobox1.ListIndex = -1 End Sub -- Regards, Tom Ogilvy "Jane" wrote in message ... I have a userform with a number of tabs and each tab has a number of lines with similar text boxes on them. The textboxes are populated by a selection from the one combo box, on the form (not on a tab). The reason for using only the one combobox and not a separate combobox for each line is because the list consists of 7,000+ items and was heavy on memory usage. I have a series of radio buttons down the side of each tab. The user selects a radio button adjacent to a line then selects from the combobox. The selected value is populated into the appropriate line on the appropriate tab. This all works well except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. I have found a similar posting to this one on another forum but unfortunately there has been no reponse (poor fellow!). Has anyone any ideas on how I can overcome this problem? Jane |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
Hi Jane
I read your question as "except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. (...) Has anyone any ideas on how I can overcome this problem?". That's what beer can do to a man. But it's worth it <g. Best wishes Harald "Jane" skrev i melding ... Thanks Tom, It obviously "refreshes" my combobox (removes the previous selection) through setting Listindex to -1 so forces the user to reselect an item but that's fine. So my code remains under the _Change event. I couldn't get Harald's suggestion of using MouseUp or KeyUp to detect a change in the selection - same result as using Change, BeforeUpdate etc. Kind regards, Jane |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
combobox events
I read this as trying to select a value that was just selected. The new
line appears to refer to the location of the output and not changing a selection in the listbox. So, to reselect a just selected item: The mousedown event as posted works for me. In the past, Dick Kusileka has also suggested this as a solution. I also understood Jane to say this solved her problem. -- Regards, Tom Ogilvy "Harald Staff" wrote in message ... Hi Jane I read your question as "except for when the user clicks on a new line and clicks on the same combobox value as was previously used. Because an actual change of value did not occur the population of the line doesn't happen. I have played around with different combobox events without much joy. (...) Has anyone any ideas on how I can overcome this problem?". That's what beer can do to a man. But it's worth it <g. Best wishes Harald "Jane" skrev i melding ... Thanks Tom, It obviously "refreshes" my combobox (removes the previous selection) through setting Listindex to -1 so forces the user to reselect an item but that's fine. So my code remains under the _Change event. I couldn't get Harald's suggestion of using MouseUp or KeyUp to detect a change in the selection - same result as using Change, BeforeUpdate etc. Kind regards, Jane |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
fill combobox depending on selection from another combobox | Excel Discussion (Misc queries) | |||
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox | Excel Programming | |||
Populating combobox from another combobox | Excel Programming | |||
events | Excel Programming | |||
events | Excel Programming |