View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SARAH SARAH is offline
external usenet poster
 
Posts: 8
Default validate phone number

thanks! :)

umm....but another probably question... :D

where do i put this code?? does it go in the macro or
something :S


-----Original Message-----
if Len(ActiveCell) = 10 then
if isnumeric(activeCell) then
activecell.Numberformat:="(###) ###-####"
else
msgbox "Must be a number"
end if
msgbox "Must be 10 digits"
End if

--
Regards,
Tom Ogilvy

"sarah" wrote in

message
...
hi,

how can i make sure the user enters a phone number.

i know u can go to formatcellsgeneral and select
specialphone number

BUT.. this only formats it to a phone number. how do I
ensure the user enters in only 10 digits?? and then also
put it in the nice 'phone number' format (###) ###-####

Help! :)



.