View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
JBL[_3_] JBL[_3_] is offline
external usenet poster
 
Posts: 2
Default Force minimum text box entry

Hello All,

I have an IsEmpty in my current code that is not working when tied to a
command button to exit the form.

Private Sub CommandButton7_Click()
'determine which button was selected
With AddNew
Select Case True
Case .OptionButton1.Value:
MsgBox "Calculate Repair Only Selected"
Case .OptionButton2.Value:
MsgBox "Calculate & Print Repair Selected"
Case .OptionButton3.Value:
MsgBox "Calculate Repair & Add to Data File Selected"
End Select
End With
If IsEmpty(AddNew.TextBox38.Value) Then
MsgBox "The repair number must be made before proceeding!"
Else

MsgBox "The active cell value is OK"
End If
AddNew.MultiPage1.Value = 1
End Sub

Since this is a tabbed form, will this only work on the complete closure of
the form? It does not make sense.

I also want to verify that the text box entry is numeric 6 digits only. I
have set the text box to Characters 6 in properties, so I know I can't have
more than 6 characters, and I have the numeric validation created, what I am
having a problem is how can I force the user to enter a 6 digit number?

Thanks in advance
JBL