Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 202
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
fill combobox depending on selection from another combobox Adam Francis Excel Discussion (Misc queries) 2 July 24th 08 07:39 PM
How Do I Load A ComboBox RowSource From The Results Of Another ComboBox Minitman[_4_] Excel Programming 3 October 26th 04 07:58 PM
Populating combobox from another combobox David Goodall Excel Programming 1 September 12th 04 03:42 PM
events Mark[_17_] Excel Programming 1 October 31st 03 09:18 AM
events Mark[_17_] Excel Programming 1 October 29th 03 12:56 PM


All times are GMT +1. The time now is 09:10 PM.

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"