By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,986 Members | 1,522 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,986 IT Pros & Developers. It's quick & easy.

About SSN

P: 2
I need to display the SSN format in different format using VB 6.

For example :
If the original SSN number is 409-61-1807 then it should display as XXX-XX-1807
I.e only the last four digits should display and the remaining should display as X

Thanks and Regards,
Dec 18 '07 #1
Share this Question
Share on Google+
3 Replies

P: 41
I think this will do it for you...

Expand|Select|Wrap|Line Numbers
  1. MsgBox "XXX-XX-" & Right("409-61-1807", 4)
I hope that answers that question for you,
Dec 18 '07 #2

Expert 5K+
P: 8,127
1. You simply need to find out the last 4 digits.
2. Hard-code the remaining.
3. Concatenate them both and display.
Dec 18 '07 #3

Expert 5K+
P: 8,434
It might be a good idea to check out the MS Masked Edit control, too.
Dec 18 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.