Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2007
    Posts
    127

    Unanswered: Validation Check - UserForm

    Each time a the user enters a Unit Number for each questionnaire, can i set a validation check to say that Unit Number entered has been already entered...

    how easy can this be done?

    The user enters the Unit number into UserForm1!TextBox1, once submitted it goes into Sheet1, column A.


    Please see attached the UserForm
    Attached Files Attached Files

  2. #2
    Join Date
    Dec 2007
    Posts
    37

    this wll do.........

    t is the textbox1 value

    call below fn with t as input

    Code:
    Sub execute(t As String)
          If t = "" Then
    
          Else
       
       
              ActiveWorkbook.Sheets("Sheet1").Activate
              Range("A1", "A65536").Select
    
    
                        Do Until IsEmpty(ActiveCell) = True
              
                             If ActiveCell.Value = t Then
                              MsgBox ("already exist")
                             End If
           
      
                                ActiveCell.Offset(1, 0).Select
    
                            Loop
      
            End If
    
            End Sub
    Meyyappan

  3. #3
    Join Date
    Oct 2007
    Posts
    127
    thanks... will give it a go

Posting Permissions

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