7 Digits Only

  • Thread starter Thread starter gregork
  • Start date Start date
G

gregork

I want to have a message box come up when there are less than seven digits
on a UserForm TextBox . How would the code go?

Greg
 
Hi
in the Exit event of this textbox you could check for the length of the
textbox value. e.g.

'....
if len(textbox1.value)<7 then
msgbox "entry too short"
cancel=true
end if
'...
 
Could there be 7digits and an alpha?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top