bạn xài tạm hàm vb6
Public Function KhongDau(s As String) As String
Dim i, oldCh$, newCh$
For i = 1 To Len(s)
oldCh = AscW(Mid(s, i, 1))
Select Case oldCh
Case 192, 193, 7840, 7842, 195, 258, 7856, 7854, 7862, 7858, 7860, 194, 7846, 7844, 7852, 7848, 7850: newCh = "A"
Case 224, 225, 7841, 7843, 227, 259, 7857, 7855, 7863, 7859, 7861, 226, 7847, 7845, 7853, 7849, 7851: newCh = "a"
Case 272: newCh = "D"
Case 273: newCh = "d"
Case 232, 233, 7865, 7867, 7869, 234, 7873, 7871, 7879, 7875, 7877: newCh = "e"
Case 200, 201, 7864, 7866, 7868, 202, 7872, 7870, 7878, 7874, 7876: newCh = "E"
Case 236, 237, 7883, 7881, 297: newCh = "i"
Case 204, 205, 7882, 7880, 296: newCh = "I"
Case 242, 243, 7885, 7887, 245, 417, 7901, 7899, 7907, 7903, 7905, 244, 7891, 7889, 7897, 7893, 7895: newCh = "o"
Case 210, 211, 7884, 7886, 213, 416, 7900, 7898, 7906, 7902, 7904, 212, 7890, 7888, 7896, 7892, 7894: newCh = "O"
Case 249, 250, 7909, 7911, 361, 432, 7915, 7913, 7921, 7917, 7919: newCh = "u"
Case 217, 218, 7908, 7910, 360, 431, 7914, 7912, 7920, 7916, 7918: newCh = "U"
Case 7923, 253, 7925, 7927, 7929: newCh = "y"
Case 7922, 221, 7924, 7926, 7928: newCh = "Y"
Case Else: newCh = ChrW(oldCh)
End Select
KhongDau = KhongDau & newCh
Next
End Function