[b]Function TiraAcento(Palavra) [/b]
CAcento = "àáâãäèéêëìíîïòóôõöùúûüÀÁÂÃÄÈÉÊËÌÍÎÒÓÔÕÖÙÚÛÜçÇñÑ"
SAcento = "aaaaaeeeeiiiiooooouuuuAAAAAEEEEIIIOOOOOUUUUcCnN"
Texto = ""
if Palavra <> "" then
For X = 1 to Len(Palavra)
Letra = mid(Palavra,X,1)
Pos_Acento = inStr(CAcento,Letra)
if Pos_Acento > 0 then
Letra = mid(SAcento,Pos_Acento,1)
end if
Texto = Texto & Letra
next
TiraAcento = Texto
end if
[b]end function [/b]
[url="http://inanyplace.blogspot.com/2010/01/vba-excel-funcao-que-tira-os-acentos.html"[/url]
Blog Office VBA | http://inanyplace.blogspot.com/
Blog Excel |
http://brzexceldeveloper.blogspot.com/
Blog Access |
http://brzaccessdeveloper.blogspot.com/
André Luiz Bernardes
A&A - WORK, DON´T PLAY!
https://sites.google.com/site/vbabernardes/
bernardess@gmail.com
Twitter: @officespecialis
@brzexceldevelop
@brzaccessdevel
A and A - In ny Place