Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Events
Hi
Chip Pearson's notes on these state that these events do not occur when the value is changed as the result of a calculation. Is it also true that these events do not occur when the change is as a result of a selection from a combo-box being changed? Regards Phil Smith |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Events
Hi Philip,
Correct. If you want an event to take place with the combo box change then it is Private Sub ComboBox1_Change() As a little further info, if you are unsure if an event is taking place when you don't want it to then during development, place a Msgbox as the first line in each event. Use the sub name as the message something like this for each event:- Msgbox "Private Sub ComboBox1_Change" has been called. Simply comment them out with a single quote when you no longer need them. Regards, OssieMac "Philip J Smith" wrote: Hi Chip Pearson's notes on these state that these events do not occur when the value is changed as the result of a calculation. Is it also true that these events do not occur when the change is as a result of a selection from a combo-box being changed? Regards Phil Smith |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Events
Hi Ossie Mac
Thanks for this. Do I need to use the active x control rather than the forms combobox for this to work? Regards Phil "OssieMac" wrote: Hi Philip, Correct. If you want an event to take place with the combo box change then it is Private Sub ComboBox1_Change() As a little further info, if you are unsure if an event is taking place when you don't want it to then during development, place a Msgbox as the first line in each event. Use the sub name as the message something like this for each event:- Msgbox "Private Sub ComboBox1_Change" has been called. Simply comment them out with a single quote when you no longer need them. Regards, OssieMac "Philip J Smith" wrote: Hi Chip Pearson's notes on these state that these events do not occur when the value is changed as the result of a calculation. Is it also true that these events do not occur when the change is as a result of a selection from a combo-box being changed? Regards Phil Smith |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Events
One way is to have worksheet_calculate code monitoring the linked cell, like
Private Sub Worksheet_Calculate() Select Case Me.Range("F1").Value Case 1: MsgBox "First value selected" Case 2: MsgBox "second value selected" 'etc End Select End Sub and then reference the linked cell in another cell, just a simple =F1 say, which will force the calculate event. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Philip J Smith" wrote in message ... Hi Ossie Mac Thanks for this. Do I need to use the active x control rather than the forms combobox for this to work? Regards Phil "OssieMac" wrote: Hi Philip, Correct. If you want an event to take place with the combo box change then it is Private Sub ComboBox1_Change() As a little further info, if you are unsure if an event is taking place when you don't want it to then during development, place a Msgbox as the first line in each event. Use the sub name as the message something like this for each event:- Msgbox "Private Sub ComboBox1_Change" has been called. Simply comment them out with a single quote when you no longer need them. Regards, OssieMac "Philip J Smith" wrote: Hi Chip Pearson's notes on these state that these events do not occur when the value is changed as the result of a calculation. Is it also true that these events do not occur when the change is as a result of a selection from a combo-box being changed? Regards Phil Smith |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change Events
Thanks. I changed from a change to a calculate event and the routine worked
perfectly. "Bob Phillips" wrote: One way is to have worksheet_calculate code monitoring the linked cell, like Private Sub Worksheet_Calculate() Select Case Me.Range("F1").Value Case 1: MsgBox "First value selected" Case 2: MsgBox "second value selected" 'etc End Select End Sub and then reference the linked cell in another cell, just a simple =F1 say, which will force the calculate event. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Philip J Smith" wrote in message ... Hi Ossie Mac Thanks for this. Do I need to use the active x control rather than the forms combobox for this to work? Regards Phil "OssieMac" wrote: Hi Philip, Correct. If you want an event to take place with the combo box change then it is Private Sub ComboBox1_Change() As a little further info, if you are unsure if an event is taking place when you don't want it to then during development, place a Msgbox as the first line in each event. Use the sub name as the message something like this for each event:- Msgbox "Private Sub ComboBox1_Change" has been called. Simply comment them out with a single quote when you no longer need them. Regards, OssieMac "Philip J Smith" wrote: Hi Chip Pearson's notes on these state that these events do not occur when the value is changed as the result of a calculation. Is it also true that these events do not occur when the change is as a result of a selection from a combo-box being changed? Regards Phil Smith |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Combine 2 worksheet change events | Excel Discussion (Misc queries) | |||
Cell change events | Excel Discussion (Misc queries) | |||
Understanding change events | Excel Programming | |||
worksheet change event error events disabled | Excel Programming | |||
Excel 97 - Inconsistent Change Events | Excel Programming |