LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Validation not working


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
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
Validation From List Not Working Erin Searfoss Excel Discussion (Misc queries) 4 August 8th 09 12:36 AM
Data Validation not working!! Please help!!!! [email protected] Excel Discussion (Misc queries) 13 April 19th 07 12:08 PM
Crazy Data Validation ... List Validation Not Working TW Bake Excel Programming 1 March 29th 07 02:41 AM
Validation is not working David Excel Programming 16 March 19th 07 03:30 AM
Data Validation Not Working Brett Excel Discussion (Misc queries) 6 March 19th 05 01:12 PM


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