Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Per Jessen,
I missed the Len part of the statement I was using Me.txtInvClaim <2 but I could still tab when entering aplha char. It's been a hard day at the office Many thanks again for your help ViViC Per Jessen wrote: Hi ViVic In the 'exit sub' you have to check if two characteres has been entered: Private Sub txtInvClaim_Exit(ByVal Cancel As MSForms.ReturnBoolean) If Not OkaytoExit Then If Me.txtInvClaim.Value = "" Or Len(Me.txtInvClaim) < 2 Then Cancel = True MsgboxResult = MsgBox("Please enter RiskCover Claim No", vbExclamation, "Shared Services") Me.txtInvClaim.SetFocus Exit Sub End If End If End Sub Regards, Per Hi all, [quoted text clipped - 76 lines] ViViC -- Message posted via http://www.officekb.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with code (error code 9) | Excel Programming | |||
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... | Excel Programming | |||
Error in Excel VBA Code (Error 91) | Excel Programming | |||
How can I still go to the error-code after a On Error Goto? | Excel Programming | |||
Code Error - Run Time Error 5 (Disable Cut, Copy & Paste) | Excel Programming |