ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   trap error in validation (https://www.excelbanter.com/excel-programming/351994-trap-error-validation.html)

RW

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

Tim[_44_]

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.


Wayne

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.



Wayne

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.



Wayne

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.



Tim[_44_]

trap error in validation
 
You must need to do your .find again, I believe.


Wayne

trap error in validation
 
Oh well, thanks anyway -- it works well...

"Tim" wrote:

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




All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com