Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Verify Phone Number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Striker - 26 Sep 2006 13:24 GMT
~~~WOW, this accidenlty went to Access Newsgroup.  Must not have been paying
attention this morning!!~~~~

Is there a method for verifying first if the data entered is a valid number,
then if it's a valid phone number?  By Valid phone number I mean is it 10
digits without any formatting  EXAMPLE ##########?

I think I can use IsNumeric for the first part, but can I pass a format to
IsNumeric, if so how?

Thank You
Gary''s Student - 26 Sep 2006 13:42 GMT
For a start:

Function IsPhone(n) As Boolean
IsPhone = False
If Application.IsNumber(n) Then
   If Len(n.Value) = 10 Then
       IsPhone = True
   End If
End If
End Function

Signature

Gary''s Student

> ~~~WOW, this accidenlty went to Access Newsgroup.  Must not have been paying
> attention this morning!!~~~~
[quoted text clipped - 7 lines]
>
> Thank You
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.