+ Reply to Thread
Results 1 to 6 of 6

form validation

  1. #1
    Registered User
    Join Date
    11-30-2006
    Posts
    57

    Question form validation

    is there a way to add validation rules to a form, i need it so that the user can only enter certain types of file but i dont know how to do it

  2. #2
    Forum Contributor
    Join Date
    12-12-2005
    Posts
    667
    Private Sub CommandButton1_Click()
    If Not IsNumeric(TextBox1.Value) Then MsgBox "Non numeric input", vbInformation
    End Sub
    Best regards,

    Ray

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523
    Quote Originally Posted by Jymoz
    is there a way to add validation rules to a form, i need it so that the user can only enter certain types of file but i dont know how to do it
    at the top menu goto data,validation

    http://www.contextures.com/xlDataVal01.html

    http://www.contextures.com/xlDataVal08.html

  4. #4
    Registered User
    Join Date
    11-30-2006
    Posts
    57
    on those links where is it i need to look?

    i can find info about general validation but not about a text box in a VB form

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523
    Quote Originally Posted by Jymoz
    on those links where is it i need to look?

    i can find info about general validation but not about a text box in a VB form
    Sorry didn't understand your original question.

    raypayette's will do what you asked, when you click the command button the message will show if the data was wrong,

    or you can place the code in a textbox exit event something like

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-30-2006
    Posts
    57
    Quote Originally Posted by davesexcel
    Sorry didn't understand your original question.

    raypayette's will do what you asked, when you click the command button the message will show if the data was wrong,

    or you can place the code in a textbox exit event something like

    Please Login or Register  to view this content.
    i can be really bad at explaining things sometimes sorry

    thanks for the code though

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1