If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Validation Check - UserForm

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-26-08, 10:41
akhlaq768 akhlaq768 is offline
Registered User
 
Join Date: Oct 2007
Posts: 127
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
File Type: zip AR_20080220_ManyeeLi_AuditForm.zip (25.2 KB, 32 views)
Reply With Quote
  #2 (permalink)  
Old 02-27-08, 07:44
karthic_85 karthic_85 is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 02-27-08, 09:32
akhlaq768 akhlaq768 is offline
Registered User
 
Join Date: Oct 2007
Posts: 127
thanks... will give it a go
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On