Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Jessy SEMPERE
Bonjour
voici un bout de code qui pourra te mettre sur la voie : ********************************************* Public Function RemoveAccent(str As String)
Dim intTab As Integer Dim tabA Dim Pointer As Integer
tabA = Array("à", "â", "ä") For intTab = 0 To UBound(tabA) Pointer = InStr(1, str, tabA(intTab)) Do While Pointer > 0 str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer + Len(tabA(intTab))) Pointer = InStr(Pointer + Len("a"), str, tabA(intTab)) Loop Next MsgBox str
End Function ********************************************* @+ Jessy Sempere - Access MVP
------------------------------------ Site @ccess : http://access.jessy.free.fr/ Pour l'efficacité de tous : http://users.skynet.be/mpfa/ ------------------------------------ "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?
Merci de votre aide.
Julien
Bonjour
voici un bout de code qui pourra te mettre sur la voie :
*********************************************
Public Function RemoveAccent(str As String)
Dim intTab As Integer
Dim tabA
Dim Pointer As Integer
tabA = Array("à", "â", "ä")
For intTab = 0 To UBound(tabA)
Pointer = InStr(1, str, tabA(intTab))
Do While Pointer > 0
str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer +
Len(tabA(intTab)))
Pointer = InStr(Pointer + Len("a"), str, tabA(intTab))
Loop
Next
MsgBox str
End Function
*********************************************
@+
Jessy Sempere - Access MVP
news@access.fr.vu
------------------------------------
Site @ccess : http://access.jessy.free.fr/
Pour l'efficacité de tous :
http://users.skynet.be/mpfa/
------------------------------------
"Juke" <juke@fr.st> a écrit dans le message news:
bm18ee$8r0$1@news-reader5.wanadoo.fr...
Bonjour,
j'ai un soucis, je recherche une fonction qui me permette d'enlever les
accents d'une chaine.
Avez vous ça en stock ?
voici un bout de code qui pourra te mettre sur la voie : ********************************************* Public Function RemoveAccent(str As String)
Dim intTab As Integer Dim tabA Dim Pointer As Integer
tabA = Array("à", "â", "ä") For intTab = 0 To UBound(tabA) Pointer = InStr(1, str, tabA(intTab)) Do While Pointer > 0 str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer + Len(tabA(intTab))) Pointer = InStr(Pointer + Len("a"), str, tabA(intTab)) Loop Next MsgBox str
End Function ********************************************* @+ Jessy Sempere - Access MVP
------------------------------------ Site @ccess : http://access.jessy.free.fr/ Pour l'efficacité de tous : http://users.skynet.be/mpfa/ ------------------------------------ "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?
Merci de votre aide.
Julien
AV
Function Virer_Accents$(chaine$) Dim tmp$ tmp = Trim(chaine) For i = 1 To Len(tmp) x = Asc(Mid(tmp, i, 1)) Select Case x Case 192 To 197: x = "A" Case 200 To 203: x = "E" Case 204 To 207: x = "I" Case 209: x = "N" Case 210 To 214: x = "O" Case 217 To 220: x = "U" Case 221: x = "Y" Case 224 To 229: x = "a" Case 232 To 235: x = "e" Case 236 To 239: x = "i" Case 241: x = "n" Case 240, 242 To 246: x = "o" Case 249 To 252: x = "u" Case 253, 255: x = "y" Case Else: x = Chr(x) End Select Virer_Accents = Virer_Accents & x Next End Function 'AV
AV "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?
Merci de votre aide.
Julien
Function Virer_Accents$(chaine$)
Dim tmp$
tmp = Trim(chaine)
For i = 1 To Len(tmp)
x = Asc(Mid(tmp, i, 1))
Select Case x
Case 192 To 197: x = "A"
Case 200 To 203: x = "E"
Case 204 To 207: x = "I"
Case 209: x = "N"
Case 210 To 214: x = "O"
Case 217 To 220: x = "U"
Case 221: x = "Y"
Case 224 To 229: x = "a"
Case 232 To 235: x = "e"
Case 236 To 239: x = "i"
Case 241: x = "n"
Case 240, 242 To 246: x = "o"
Case 249 To 252: x = "u"
Case 253, 255: x = "y"
Case Else: x = Chr(x)
End Select
Virer_Accents = Virer_Accents & x
Next
End Function 'AV
AV
"Juke" <juke@fr.st> a écrit dans le message news:
bm18ee$8r0$1@news-reader5.wanadoo.fr...
Bonjour,
j'ai un soucis, je recherche une fonction qui me permette d'enlever les
accents d'une chaine.
Avez vous ça en stock ?
Function Virer_Accents$(chaine$) Dim tmp$ tmp = Trim(chaine) For i = 1 To Len(tmp) x = Asc(Mid(tmp, i, 1)) Select Case x Case 192 To 197: x = "A" Case 200 To 203: x = "E" Case 204 To 207: x = "I" Case 209: x = "N" Case 210 To 214: x = "O" Case 217 To 220: x = "U" Case 221: x = "Y" Case 224 To 229: x = "a" Case 232 To 235: x = "e" Case 236 To 239: x = "i" Case 241: x = "n" Case 240, 242 To 246: x = "o" Case 249 To 252: x = "u" Case 253, 255: x = "y" Case Else: x = Chr(x) End Select Virer_Accents = Virer_Accents & x Next End Function 'AV
AV "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?
Merci de votre aide.
Julien
Juke
comment je l'insere ? comme une macro ?
sinon merci "Jessy SEMPERE" a écrit dans le message de news:bm197u$t04$
Bonjour
voici un bout de code qui pourra te mettre sur la voie : ********************************************* Public Function RemoveAccent(str As String)
Dim intTab As Integer Dim tabA Dim Pointer As Integer
tabA = Array("à", "â", "ä") For intTab = 0 To UBound(tabA) Pointer = InStr(1, str, tabA(intTab)) Do While Pointer > 0 str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer + Len(tabA(intTab))) Pointer = InStr(Pointer + Len("a"), str, tabA(intTab)) Loop Next MsgBox str
End Function ********************************************* @+ Jessy Sempere - Access MVP
------------------------------------ Site @ccess : http://access.jessy.free.fr/ Pour l'efficacité de tous : http://users.skynet.be/mpfa/ ------------------------------------ "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?
Merci de votre aide.
Julien
comment je l'insere ? comme une macro ?
sinon merci
"Jessy SEMPERE" <jessy.sempere@prg.sncf.fr> a écrit dans le message de
news:bm197u$t04$1@muguet.sncf.fr...
Bonjour
voici un bout de code qui pourra te mettre sur la voie :
*********************************************
Public Function RemoveAccent(str As String)
Dim intTab As Integer
Dim tabA
Dim Pointer As Integer
tabA = Array("à", "â", "ä")
For intTab = 0 To UBound(tabA)
Pointer = InStr(1, str, tabA(intTab))
Do While Pointer > 0
str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer +
Len(tabA(intTab)))
Pointer = InStr(Pointer + Len("a"), str, tabA(intTab))
Loop
Next
MsgBox str
End Function
*********************************************
@+
Jessy Sempere - Access MVP
news@access.fr.vu
------------------------------------
Site @ccess : http://access.jessy.free.fr/
Pour l'efficacité de tous :
http://users.skynet.be/mpfa/
------------------------------------
"Juke" <juke@fr.st> a écrit dans le message news:
bm18ee$8r0$1@news-reader5.wanadoo.fr...
Bonjour,
j'ai un soucis, je recherche une fonction qui me permette d'enlever les
accents d'une chaine.
Avez vous ça en stock ?
sinon merci "Jessy SEMPERE" a écrit dans le message de news:bm197u$t04$
Bonjour
voici un bout de code qui pourra te mettre sur la voie : ********************************************* Public Function RemoveAccent(str As String)
Dim intTab As Integer Dim tabA Dim Pointer As Integer
tabA = Array("à", "â", "ä") For intTab = 0 To UBound(tabA) Pointer = InStr(1, str, tabA(intTab)) Do While Pointer > 0 str = Left(str, Pointer - 1) & "a" & Mid(str, Pointer + Len(tabA(intTab))) Pointer = InStr(Pointer + Len("a"), str, tabA(intTab)) Loop Next MsgBox str
End Function ********************************************* @+ Jessy Sempere - Access MVP
------------------------------------ Site @ccess : http://access.jessy.free.fr/ Pour l'efficacité de tous : http://users.skynet.be/mpfa/ ------------------------------------ "Juke" a écrit dans le message news: bm18ee$8r0$
Bonjour, j'ai un soucis, je recherche une fonction qui me permette d'enlever les accents d'une chaine. Avez vous ça en stock ?