About SSN

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 702159
    New Member
    • Dec 2007
    • 2

    About SSN

    Hi,
    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,
    Pradeep
  • Torgg
    New Member
    • Dec 2007
    • 41

    #2
    I think this will do it for you...

    Code:
    MsgBox "XXX-XX-" & Right("409-61-1807", 4)
    I hope that answers that question for you,
    Torgg

    Comment

    • debasisdas
      Recognized Expert Expert
      • Dec 2006
      • 8119

      #3
      1. You simply need to find out the last 4 digits.
      2. Hard-code the remaining.
      3. Concatenate them both and display.
      Last edited by Killer42; Dec 18 '07, 07:39 AM.

      Comment

      • Killer42
        Recognized Expert Expert
        • Oct 2006
        • 8429

        #4
        It might be a good idea to check out the MS Masked Edit control, too.

        Comment

        Working...