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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
sub test()
txt=ConverAcute("éàè")
end sub
Public Function ConverAcute(txt) As String
ConverAcute = Trim("" & txt)
ConverAcute = Replace(ConverAcute, "Á", "Á", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "á", "á", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "À", "À", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "à", "à", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Â", "Â", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "â", "â", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ä", "Ä", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ä", "ä", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "É", "É", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "é", "é", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "È", "È", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "è", "è", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ê", "ê", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ê", "Ê", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ë", "Ë", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ë", "¨", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Í", "Í", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "í", "í", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ì", "Ì", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ì", "ì", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Î", "Î", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "î", "î", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ï", "Ï", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ï", "ï", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ó", "Ó", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ó", "Ó", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ò", "Ò", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ò", "ò", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ô", "Ô", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ô", "ô", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ö", "Ö", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ö", "ö", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ú", "Ú", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ú", "ú", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ù", "Ù", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ù", "ù", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Û", "Û", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "û", "û", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ü", "Ü", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ü", "ü", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "Ý", "Ý", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ý", "ý", 1, -1, vbBinaryCompare)
ConverAcute = Replace(ConverAcute, "ÿ", "ÿ", 1, -1, vbBinaryCompare)
End Function |
Partager