Microsoft
Software
Hardware
Network
Question : Excel - VBA text formatting
I'm trying to format the text of a TextBox into SSN format ###-##-####. My code looks like this .Text = Format(.Text, "###-##-####").
It works everytime until the leading character is a zero. If I enter 012345678 it will drop the leading zero. How do I prevent this?
Answer : Excel - VBA text formatting
Use this format string:
"000-00-0000"
When you use #, it gets dropped if it's not "needed".
Random Solutions
SpellNumber
Can't Figure Out How to Turn Off PHP Display Errors
Auto Send Excel as Email Attachment
Fields not being read from CSV
Default Printer Changes using Terminal Server
Use different HTTP Redirects on multiple virtual directories in IIS 7.5
Update HP onboard administrator SSH version?
Getting round-robin load balancing working with vSphere 4.0 cluster on EqualLogic PS4000X
ODBC connect to ORACLE 11G using Redhat Linux 5.4
Flag duplicate record