View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Myles[_33_] Myles[_33_] is offline
external usenet poster
 
Posts: 1
Default UserForms, mandatory completion of fields


I would abandon the Query_Close Event and rather use a CommandButton
with this code:

Private Sub CommandButton1_Click()
If Len(TextBox1).text = 0 Then
MsgBox "please complete all mandatory fields"
Exit sub
Else
Unload UserForm1
Userform5.Show
End If
End Sub


--
Myles
------------------------------------------------------------------------
Myles's Profile: http://www.excelforum.com/member.php...o&userid=28746
View this thread: http://www.excelforum.com/showthread...hreadid=500988