Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default 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
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
Combine 2 worksheet change events nobbyknownowt Excel Discussion (Misc queries) 0 May 28th 10 10:49 AM
Cell change events Richard Excel Discussion (Misc queries) 2 May 16th 07 04:18 PM
Understanding change events xhat Excel Programming 6 July 28th 06 02:44 PM
worksheet change event error events disabled Peter[_21_] Excel Programming 2 July 10th 04 08:45 AM
Excel 97 - Inconsistent Change Events TightCode Excel Programming 0 July 31st 03 06:00 PM


All times are GMT +1. The time now is 03:42 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"