PDA

View Full Version : Mask on account numbers to let users enter 10 digits only



RajOberoi
02-27-2019, 08:07 AM
Hi guys,

I have written the following code and it works fine but is there any way we can display 10 underscores ( like input mask so the users will know they need to enter 10 digits??)




Private Sub txtAccount1_Change()
Static abort As Boolean
Static c
If abort Then: abort = False: Exit Sub
With txtAccount1
c = c + 1
abort = True
.Text = Left(.Text, 10)
End With
End Sub