Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Validation list changes don't fire an event

I need to run a subroutine depending on the value of a validation list.
Currently I use Worksheet_SelectionChange to see if the validation list
was entered from another cell and that works. However I have the need
to run subroutines where a specific subroutine is run depending on the
value of the validation list.

Where this all breaks down is when a user changes the value of the
valdation list without leaving the cell. I can manually change the
value of the cell that contains the validation list, but I can't get
any type of event to fire when the value is changed.

Suppose the cell A1 has a validation list of "Pass", "Fail", and "N/A".
If I go from any other cell to A1 and select "Pass" the
Worksheet_SelectionChange event fires. But if A1 remains the current
cell and I change its value from "Pass" to "Fail" the
Worksheet_SelectionChange event fails to fire. I need specific
subroutines to run depending on what the cell's value is manually
changed to.

Using the trick of a separate worksheet's Calulate event to hack firing
an event with a change of the validation list is unacceptable. (And I
could never get it to work the way I need things to work).

Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Validation list changes don't fire an event

Use the Worksheet_Change event to check a change in the DV cell.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"MrAlb" wrote in message
oups.com...
I need to run a subroutine depending on the value of a validation list.
Currently I use Worksheet_SelectionChange to see if the validation list
was entered from another cell and that works. However I have the need
to run subroutines where a specific subroutine is run depending on the
value of the validation list.

Where this all breaks down is when a user changes the value of the
valdation list without leaving the cell. I can manually change the
value of the cell that contains the validation list, but I can't get
any type of event to fire when the value is changed.

Suppose the cell A1 has a validation list of "Pass", "Fail", and "N/A".
If I go from any other cell to A1 and select "Pass" the
Worksheet_SelectionChange event fires. But if A1 remains the current
cell and I change its value from "Pass" to "Fail" the
Worksheet_SelectionChange event fails to fire. I need specific
subroutines to run depending on what the cell's value is manually
changed to.

Using the trick of a separate worksheet's Calulate event to hack firing
an event with a change of the validation list is unacceptable. (And I
could never get it to work the way I need things to work).

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Validation list changes don't fire an event

Use the Change event.

Worksheet_Change fires when a cell value changes.
Worksheet_SelectionChange fires when the cell is selected and before the
value is changed.

--
Regards,
Tom Ogilvy

"MrAlb" wrote in message
oups.com...
I need to run a subroutine depending on the value of a validation list.
Currently I use Worksheet_SelectionChange to see if the validation list
was entered from another cell and that works. However I have the need
to run subroutines where a specific subroutine is run depending on the
value of the validation list.

Where this all breaks down is when a user changes the value of the
valdation list without leaving the cell. I can manually change the
value of the cell that contains the validation list, but I can't get
any type of event to fire when the value is changed.

Suppose the cell A1 has a validation list of "Pass", "Fail", and "N/A".
If I go from any other cell to A1 and select "Pass" the
Worksheet_SelectionChange event fires. But if A1 remains the current
cell and I change its value from "Pass" to "Fail" the
Worksheet_SelectionChange event fails to fire. I need specific
subroutines to run depending on what the cell's value is manually
changed to.

Using the trick of a separate worksheet's Calulate event to hack firing
an event with a change of the validation list is unacceptable. (And I
could never get it to work the way I need things to work).

Any ideas?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Validation list changes don't fire an event

I knew that. ;-)

Huh boy... the things we forget when we don't practice our skills.

Thanks, Bob. :-)

Bob Phillips wrote:
Use the Worksheet_Change event to check a change in the DV cell.

--
HTH

Bob Phillips


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
Event doesn't fire Frank Xia Excel Discussion (Misc queries) 6 February 11th 06 12:54 AM
Fire Event only when Cell Change? HotRod Excel Programming 7 April 28th 05 08:43 PM
Workbook Open event does not fire Robots Excel Programming 2 December 3rd 04 11:26 PM
Event class doesn't fire in embedded VBA Tornados[_5_] Excel Programming 0 September 28th 04 03:27 PM
Event to fire when pivottable is pivoted Tod Excel Programming 1 April 5th 04 09:09 PM


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