VBScript - Masking a phone number to (XXX) XXX-XXXX 
Author Message
 VBScript - Masking a phone number to (XXX) XXX-XXXX

Hello,
Is there a function in VBScript that allows me to mask a
phone digit string into (XXX)XXX-XXXX.

Thanks so much



Sun, 12 Dec 2004 02:26:33 GMT  
 VBScript - Masking a phone number to (XXX) XXX-XXXX
        function formatPhone(phone)
                if (phone <> "")then
                phone = "(" & Left(phone,3)& ")" & " " &
Mid(phone,4,3) & "-" & Right(phone,4)
                else
                phone = ""
                end if
                formatPhone = phone
        End function
Quote:
>-----Original Message-----
>Hello,
>Is there a function in vbscript that allows me to mask a
>phone digit string into (XXX)XXX-XXXX.

>Thanks so much
>.



Sun, 12 Dec 2004 05:08:39 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. I would like make a "PING XXX.XXX.XXX.XXX"

2. Macro to Find xxx and then delete all text before xxx

3. Attn.weiner @xxx.xxx

4. "Name" xxx As xxx problem

5. Function to convert long Pathname to x: \xxx\...\xxx\name.ext

6. Built-in controls can't handle xxxxxxx.xxx format directory names

7. masked box and phone number

8. Input Masking for phone number fields

9. suo file and A first chance exception of type "XXX" occurred in XXX.dll

10. how to delay XXX milliseconds with Java Script

 

 
Powered by phpBB® Forum Software