Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default 7 Digits Only

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default 7 Digits Only

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
'...

--
Regards
Frank Kabel
Frankfurt, Germany

gregork wrote:
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 7 Digits Only

Could there be 7digits and an alpha?

--

HTH

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


"Frank Kabel" wrote in message
...
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
'...

--
Regards
Frank Kabel
Frankfurt, Germany

gregork wrote:
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you change single digits to recognized double digits? Evil with a K[_2_] Excel Worksheet Functions 5 April 3rd 23 02:29 PM
VBA write macro change column with 3 number digits to 4 digits the James C[_2_] Excel Discussion (Misc queries) 3 January 25th 10 03:12 PM
number 12 digits to 15 digits mehdy-e Excel Discussion (Misc queries) 5 November 13th 09 04:43 PM
How to customize number to 10 digits including 2 digits after deci Carina Excel Worksheet Functions 3 September 20th 07 02:50 AM
last 2 digits rexmann Excel Discussion (Misc queries) 2 March 6th 07 09:40 AM


All times are GMT +1. The time now is 11:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"