Hi, I'm trying to do data validation on a text box on a modeless form (ShowModal = False) the following code works when ShowModal = True, but due to the interaction I need the form to be ShowModal = False. How do I get around this problem???
Private Sub MazeH_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
With Me.ActiveControl
If .Value < 10 And .Value <> vbNullString Then
MsgBox "Value must be 10 or more", vbCritical, "Input Error"
Cancel = True
.Value = Horz
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End If
End With
End Sub
Private Sub MazeH_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
With Me.ActiveControl
If .Value < 10 And .Value <> vbNullString Then
MsgBox "Value must be 10 or more", vbCritical, "Input Error"
Cancel = True
.Value = Horz
.SetFocus
.SelStart = 0
.SelLength = Len(.Text)
End If
End With
End Sub