VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

FindPhoneNo

Brett A. Paul  (1 Submission)   String Manipulation   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This function searches a text string for possible phone numbers and returns an array of those numbers. It allows you to specify a default area code, too. (If you know an easier or more elegant way to do this, let me know!) Doesn't work for international numbers.

Inputs
Text - Text to be searched for phone numbers DefaultAreaCode - if a 7-digit phone number is found, this goes on the front of it

Returns
Variant: Array of phone numbers. The array is dimensioned at 0 to start, so if the return's UBound is 0, no phone numbers were found.

Rate FindPhoneNo (2(2 Vote))
FindPhoneNo.bas

FindPhoneNo Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters