0
Thanks

A few words of thanks would be greatly appreciated.

Excel - Input mask issue


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

Issue

"A.44.A.04.04"

Solution

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.

0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jean-François Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.
This document, titled « Excel - Input mask issue », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!