ник: ddi
Function convert(str As String, tip As String) As String
convert = vbNull
Dim nstr As String = vbNull
Dim ANSI(93) As Long
Dim UNICODE(93) As Long
Dim x As Long = 1
For i As Integer = 178 To 252 Step 2
ANSI(x) = i : UNICODE(x) = 1328 + (i - 176) / 2 ' metatar
ANSI(x) = i + 1 : UNICODE(x) = 1376 + (i - 176) / 2 : x = x + 1 ' poqratar
Next
ANSI(x) = 39 : UNICODE(x) = CLng("&H587") : x = x + 1 'ev
ANSI(x) = 183 : UNICODE(x) = 8226 : x = x + 1 'poqratar g-n (bullet)
ANSI(x) = 8226 : UNICODE(x) = 1379 : x = x + 1 'poqratar g-n (bullet)
ANSI(x) = 39 : UNICODE(x) = CLng("&H55A") : x = x + 1 'apostrophe
ANSI(x) = 176 : UNICODE(x) = CLng("&H55B") : x = x + 1 'shesht
ANSI(x) = 175 : UNICODE(x) = CLng("&H55C") : x = x + 1 'bacakanchakan
ANSI(x) = 170 : UNICODE(x) = CLng("&H55D") : x = x + 1 'but
ANSI(x) = 177 : UNICODE(x) = CLng("&H55E") : x = x + 1 'harcakan
ANSI(x) = 163 : UNICODE(x) = CLng("&H589") : x = x + 1 'verjaket
ANSI(x) = 17 : UNICODE(x) = CLng("&H58A") : x = x + 1 'hyphen
ANSI(x) = 167 : UNICODE(x) = CLng("&HAB") : x = x + 1 'bacvogh chakert
ANSI(x) = 166 : UNICODE(x) = CLng("&HBB") : x = x + 1 'pakvogh chakert
ANSI(x) = 171 : UNICODE(x) = CLng("&H2C") : x = x + 1 'storaket
ANSI(x) = 169 : UNICODE(x) = CLng("&H2E") : x = x + 1 'mijaket
ANSI(x) = 174 : UNICODE(x) = CLng("&H2026") : x = x + 1 'bazmaket
ANSI(x) = 0 : UNICODE(x) = 0
Select tip
Case "a"
For l = 0 To ANSI.Length - 1
For x = 1 To Len(str)
If Asc(Mid(str, x, 1)) = ANSI(l) Then
nstr = nstr & ChrW(UNICODE(l))
MsgBox(ChrW(UNICODE(l)))
End If
Next
Next
Case "u"
End Select
convert = nstr
End Function
Где ошибка?