Excel - Input mask issue

October 2016

I would like to assign a custom input mask to a textbox like this:




Try this:
Dim lt As Long
lt = Len(TextBox1.Text)
If lt = 1 Or lt = 4 Or lt = 6 Or lt = 9 Then
  TextBox1.Text = TextBox1.Text & "."
End If

Thanks to ccm81 for this tip.

Related :

This document entitled « Excel - Input mask issue » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.