Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello !!
I have requirement to validate for Null value in excel sheet. Below code is used in one of my application (Which compares Column A & B entry. As of now, it validates for A Column <= Column B), but fails to validate for Null, which is creating problem. I have tried by setting IgnoreBlank = False, but no success. Please help me out !! to validate for Null value as well in either Column A 0r B. Private Sub Workbook_Open() Dim intCnt As Integer Dim intTotal As Integer intTotal = 10 For intCnt = 1 To intTotal Range("A" & intCnt).Select With Selection.Validation .Delete .Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _ Operator:=xlBetween, Formula1:="0", Formula2:="=B" & intCnt .IgnoreBlank = True .InCellDropdown = False .ErrorTitle = "A Vs B Qty Error" .ErrorMessage = "A Quantity cannot be greater than B Quantity." .ShowInput = True .ShowError = True End With Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Data Validation in another sheet | Excel Discussion (Misc queries) | |||
[err] Excel 2007 - Data validation from another sheet? | Excel Discussion (Misc queries) | |||
Excel sheet validation | Excel Discussion (Misc queries) | |||
Dat Validation Different Sheet | Excel Programming | |||
Validation from another sheet | Excel Programming |