![]() |
Error when checking field for data
I'm having an intermittent problem with checking for data in a cell. I
get a type mismatch error but the occurrance of the error is rare. My goal is to require the user to enter a date in a particular cell. The contents of this cell are then propogated to corresponding cells on pages 2 and 3 of my form. In my setup module I have a variable defined as a range and set to the cell I want to check. Public objDateReqd As Range Set objDateReqd = Range("H15") In my Process module I have the following if statement to check for contents. If objDateReqd = "" Then 'If "Date Req'd" cell is blank, display error message MsgBox "Please enter the date required in the appropriate field." & Chr(13) & _ "A value of 'ASAP' is acceptable however a specific date " & Chr(13) & _ "is more valuable", , "Incomplete Form Error" objDateReqd.Select strEntryError = "Y" 'Set Entry Error flag to "Y" Exit Sub End If When the type mismatch error occurs it does so on the "If..." line. Again, the error seldomly occurs but it does so just often enough to be annoying. Anyone have any thoughts on what might be going on? BrianG |
Error when checking field for data
|
All times are GMT +1. The time now is 05:21 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com