View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel[_8_] Nigel[_8_] is offline
external usenet poster
 
Posts: 172
Default Inputting data from Userform

One simple way..............

Private Sub CommandButton1_Click()
If Len(textbox1.Value) = 0 or Len(textbox2.Value) = 0 or
Len(TextBox3.Value) = 0 or Len(TextBox4.Value) = 0 Then
MsgBox "Not all values are entered"
Else
'do something else
End If
End Sub

Cheers
Nigel

"Sony" wrote in message
...
I have setup a user form that fills in Cells A through
D. I want to make sure that all the cells have data. Is
there a way to verify that all cells have data and if
they do not it prompts the user to enter the data before
the form can be sent, saved or closed?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---