Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() It doesn't like adding that validation to an empty cell. Check for that before, if empty put something in and remove it after:WasEmpty = False If IsEmpty(Selection) Then Selection.Value = "z" WasEmpty = True End If With Selection.Validation Delete Add Type:=xlValidateCustom, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=AND(len(B" & lCurRow & ")=7,ISNUMBER(MID(B" & lCurRow & ",2,6)*1),CODE(LEFT(UPPER(B" & lCurRow & "),1))64,CODE(LEFT(UPPER(B" & lCurRow & "),1))<91)" InCellDropdown = True InputTitle = "" ErrorTitle = "Client ID Error" InputMessage = "" ErrorMessage = "The State ID must consist of 1 letter and 6 numbers (A123456)" ShowInput = False ShowError = True IgnoreBlank = False End With If WasEmpty Then Selection.Value = "" -- p45cal *p45cal* ------------------------------------------------------------------------ p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=131471 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Validation From List Not Working | Excel Discussion (Misc queries) | |||
Data Validation not working!! Please help!!!! | Excel Discussion (Misc queries) | |||
Crazy Data Validation ... List Validation Not Working | Excel Programming | |||
Validation is not working | Excel Programming | |||
Data Validation Not Working | Excel Discussion (Misc queries) |