Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation error
I'm trying to modify validation for adjacent celss on the fly depending on
the value of the previous cell. I've got this code but it is throwing an error. ????? If ActiveCell.Offset(0, -1).Value = "D" Then 'Range(Myaddress).Validation.Modify (xlValidateDate, xlValidAlertInformation, _ xlBetween, ="1/1/2010", ="12/31/2020") Endif |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Validation error
What I wound up with was:
If ActiveCell.Offset(0, -1).Value = "D" Then With Range(Myaddress).Validation .Delete .Add Type:=xlValidateDate, _ AlertStyle:=xlValidAlertInformation, _ Operator:=xlBetween, _ Formula1:="1/1/2010", Formula2:="12/31/2020" End With Else With Range(Myaddress).Offset(0, 1).Validation .Delete .Add Type:=xlValidateDate, _ AlertStyle:=xlValidAlertInformation, _ Operator:=xlBetween, _ Formula1:="1/1/2010", Formula2:="12/31/2020" End With "Hydra" wrote: I'm trying to modify validation for adjacent celss on the fly depending on the value of the previous cell. I've got this code but it is throwing an error. ????? If ActiveCell.Offset(0, -1).Value = "D" Then 'Range(Myaddress).Validation.Modify (xlValidateDate, xlValidAlertInformation, _ xlBetween, ="1/1/2010", ="12/31/2020") Endif |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Validation error | Excel Programming | |||
error on add validation | Excel Programming | |||
Validation Error - Please Help!!! | Excel Programming | |||
validation error, urgent plz help | Excel Worksheet Functions | |||
validation - error mismatch | Excel Programming |