![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#3
|
||||
|
||||
|
I think I too might follow the approach suggested by NoSparks, but the following should work
Code:
Private Sub txtBillToCust_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'Checks the txtBillToCust field for a blank entry
If Not Len(txtBillToCust.Text) = 8 Then
txtBillToCust.BackColor = &HFF&
MsgBox "Please enter the 8-digit Customer Number"
Cancel = True
txtBillToCust.Text = ""
txtBillToCust.SetFocus
Exit Sub
Else
txtBillToCust.BackColor = &H80000005
End If
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can't use RTF Textbox in Userform (Word2007) | dherr | Word VBA | 2 | 03-16-2015 07:50 AM |
Userform VBA Textbox Calculation
|
MarkAn | Word VBA | 2 | 08-15-2014 06:50 AM |
| Hyperlink not activated by footpedal | Donone | PowerPoint | 2 | 05-05-2014 04:42 AM |
Display result in textbox based on the input of another textbox
|
scarymovie | Word VBA | 5 | 05-16-2012 07:05 PM |
Number format in Textbox on userform
|
officeclerk | Excel Programming | 2 | 04-17-2012 01:23 AM |