1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| Dim char()
Private Sub CommandButton1_Click()
Me.Tag = Me.TextBox1
Me.Hide
End Sub
Public Function InputBoite()
Me.Show vbModal
On Error Resume Next
InputBoite = Me.Tag
On Error GoTo 0
Unload Me
End Function
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim I As Integer
Dim t As String
t = Chr(KeyAscii)
For I = 0 To UBound(char) Step 2
t = Replace(t, Trim("" & char(I)), Trim("" & char(I + 1)), compare:=vbBinaryCompare)
Next
If Trim(ee & t) = "" Then KeyAscii = vbNull Else KeyAscii = Asc(t)
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
char = Array(Chr(10), "", Chr(13), "", "%", "", "?", "", "!", "", ";", "", "!", ",""", "§", "", ".", "", "/", "", "*", "", "+", "", "-", "", " ", "", "@", "", "Á", "A", "á", "a", "À", "A", "à", "a", "Â", "A", "â", "a", "Ä", "A", "ä", "a", "C", "C", "c", "c", "É", "E", "é", "e", "È", "E", "è", "e", "Ê", "E", "ê", "e", "Ë", "E", "ë", "e", "H", "H", "h", "h", "Í", "I", "í", "i", "Ì", "I", "ì", "i", "Î", "I", "î", "i", "Ï", "I", "ï", "i", "J", "J", "j", "j", "L", "L", "l", "l", "N", "N", "n", "n", "Ó", "O", "ó", "o", "Ò", "O", "ò", "o", "Ô", "O", "ô", "o", "Ö", "O", "ö", "o", "R", "R", "r", "r", "S", "S", "s", "s", "S", "S", "s", "s", "Ú", "U", "ú", "u", "Ù", "U", "ù", "u", "Û", "U", "û", "u", "Ü", "U", "ü", "u", "W", "W", "w", "w", "Ý", "Y", "ý", "y", "Y", "Y", "y", "y", "", "Y", "ÿ", "y", "Z", "Z", "z", "z")
End Sub |