property MaskEdit.MaskValue ([IncludeLiteralEscape as Variant]) as String
Retrieves a value that indicates the masked value.

 TypeDescription 
   IncludeLiteralEscape as Variant A boolean expression that indicates whether the result includes the literal escape characters.   
   String A string expression that indicates the control's value.  

Use the MaskValue to get only the characters that fit the control's current mask. Use the Text property to get the full control's text, including non masking characters. Use the Mask property to assign a single mask to the control. Use the Masks property to assign multiple masks to the control.

The following sample displays the masking value:

Private Sub Form_Load()
    With MaskEdit1
        .Masks = "USA resident;(090)-###-###-###;Canada resident;(091)-###-###-###"
    End With
End Sub

Private Sub MaskEdit1_Change()
    Debug.Print "The current value is: " & MaskEdit1.MaskValue(False)
End Sub


Send comments on this topic.
© 1999-2007 Exontrol Inc, Software. All rights reserved.