LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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

 
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
Checking status of issues based on first two digits of a field The Fool on the Hill Excel Discussion (Misc queries) 7 February 26th 08 03:12 PM
Checking on first two digits of field The Fool on the Hill Excel Discussion (Misc queries) 5 February 26th 08 07:46 AM
Cannot update <field name; field not updatable. (Error 3113) Boo Ray Excel Worksheet Functions 0 November 27th 07 01:39 PM
Checking whether a field is bold. Craig & Co. Excel Programming 2 August 23rd 05 04:30 AM
Checking database field Chris Dunigan Excel Programming 2 November 24th 03 11:13 AM


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