View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Zani Zani is offline
external usenet poster
 
Posts: 29
Default UserForms - making responses mandatory

Thanks Bob

Does the trick, why is it always the most simple of things that cause the
most grief!

Thanks again!
--
Zani
(if I have posted here, I really am stuck!)



"Bob Phillips" wrote:

Just add a close button to the userform and test in ther. Something like

Private Sub cmdClose_Click()
With TextBox1
If .Text = "" Then
MsgBox "Invalid data"
.SetFocus
Else
Me.Hide
End If
End With
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Zani" wrote in message
...
I am doing a project which involves collecting H&S data, via a series of
UserForms, and dumping all the information into a worksheet for further
reporting etc.

My current stumbling block is how to make certain fields on the UserForm
mandatory, so that they have to be filled in by the user before they can
close down the form?

Any ideas will be hugely appreciated - it's getting late and I can't sleep
not knowing this!!!
--
Zani
(if I have posted here, I really am stuck!)