View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Henry[_4_] Henry[_4_] is offline
external usenet poster
 
Posts: 72
Default Time Format & Unload problem

Rod,

As per my earlier post, this will check all the fields have an entry.
If so, it will do your actions and leave the sub.
If any of your fields are empty, it'll put up your messagebox.
When the user clicks OK on the message box, the message
box will go and will show the form as it was before the message box
appeared.
In other words, the user won't be able to leave the form until there is an
entry in
all of your fields.


If Leave_REQ < "" And REQ_CONT_INT < "" And AL_DMN < "" _
and AL_ConTyp< "" And ST_Time < "" And ET_Time < "" Then
'This checks that all of your fields have an entry (therefore, none are
empty)
'
'
'
' 'Act on your data here
'
'
'
Unload Me
'unload the form
'
'
Else
'At least one of your fields is empty
MsgBox ("You must Fill in all INFO to make A Request")
End If
End Sub

"Rod Taylor" wrote in message
.. .
Someone asked for the code on the unload issue
If Leave_REQ = "" Or REQ_CONT_INT = "" Or AL_DMN = "" Or AL_ConTyp = "" Or
ST_Time = "" Or ET_Time = "" Then
MsgBox ("You must Fill in all INFO to make A Request")
Leave_REQ = "": ST_Time = "": ET_Time = "": REQ_CONT_INT = "":

REQ_INFO
= ""
AWS = "": AL_DMN = "": SHFT = "": TODAY_TIME = "": FPE = "": AL_ConTyp =

""
End If


This is the if statment and it cleares all the info would rather not clear
the info but allow the user to fill in the required info.