Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RW RW is offline
external usenet poster
 
Posts: 49
Default trap error in validation

Hi,

I have created a range of cells that use data validation to limit the users
choices to one of a list. They are allowed to enter something not on the
list, however if they do I need to change formulas in another range of cells.
Is it possible, and how, can I trap for this error/warning, then excute some
code....

Thanks
wAyne
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default trap error in validation

When a cell is changed, could you use the

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

event to validate the range? (Do you know what I am talking about and
how to do that?) After you build your worksheet, enter the macro
system (alt-F11), double click on the name of the worksheet in the
project explorer, select 'Worksheet' in the first drop-down box, and
program away.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default trap error in validation

Thanks Tim,

I have that programming done - works OK, question ius .. is there a way to
see if the new value has failed data validation, or do I have to check the
value against the list again....

wAyne

"Tim" wrote:

When a cell is changed, could you use the

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

event to validate the range? (Do you know what I am talking about and
how to do that?) After you build your worksheet, enter the macro
system (alt-F11), double click on the name of the worksheet in the
project explorer, select 'Worksheet' in the first drop-down box, and
program away.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default trap error in validation

You must need to do your .find again, I believe.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default trap error in validation

Oh well, thanks anyway -- it works well...

"Tim" wrote:

You must need to do your .find again, I believe.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default trap error in validation

Hi,

One other thinng how can i identify which cell was changed -- I tried using
activecell, but if you hit tab or return it goes to the next cell .. The
value ins in Target but where is the address.

Thanks in advance
wAyne

"Tim" wrote:

When a cell is changed, could you use the

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

event to validate the range? (Do you know what I am talking about and
how to do that?) After you build your worksheet, enter the macro
system (alt-F11), double click on the name of the worksheet in the
project explorer, select 'Worksheet' in the first drop-down box, and
program away.


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default trap error in validation

don't worry abotu this one I figured it out... duh.. Target.address...
thx

"wAyne" wrote:

Hi,

One other thinng how can i identify which cell was changed -- I tried using
activecell, but if you hit tab or return it goes to the next cell .. The
value ins in Target but where is the address.

Thanks in advance
wAyne

"Tim" wrote:

When a cell is changed, could you use the

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

event to validate the range? (Do you know what I am talking about and
how to do that?) After you build your worksheet, enter the macro
system (alt-F11), double click on the name of the worksheet in the
project explorer, select 'Worksheet' in the first drop-down box, and
program away.


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
Error Trap Kirk P. Excel Programming 2 September 8th 05 09:51 PM
Error Trap TEB2 Excel Programming 2 March 15th 05 05:34 PM
Error Trap Not Working Otto Moehrbach[_6_] Excel Programming 7 April 13th 04 12:15 PM
error trap Rhonda[_3_] Excel Programming 2 October 22nd 03 07:07 PM


All times are GMT +1. The time now is 11:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"