View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
JCO JCO is offline
external usenet poster
 
Posts: 54
Default Format Telephone Numbers

This actually has a compile error and I'm sorry, I don't know enough to fix
it.
Thanks so far for all you help and patients.

"Ron Rosenfeld" wrote in message
...

On Fri, 12 Nov 2010 16:35:59 -0600, "JCO"
wrote:

Sorry it took so long... I've been vacationing in Mexico for the past week.
I read your reply. So what do I have to do to have it appear in Text
format? I actually think the text field is preferred in my case.


Just output it as a formatted text string.

So instead of:

==========================
..Value = re.Replace(.Text, "")
..NumberFormat = _
"[9999999]000\.000\.0000;000\.0000"
============================

You'd have something like (not tested):

==============================
..Value = Format(re.replace(.text,""), _
"[9999999]000\.000\.0000;000\.0000"
===============================