Dim kytuarr()
Sub khoitaomang()
Dim i As Long, cnt As Long
Dim sarr, CharCode
sarr = Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", _
"-", ">", ":", ",", " ", ".", "!", "[", "]", "(", ")", "?", _
"{", "}", "%", "&", "#", "$", "=", "+", "-", "<", ">", ";", "@", "\", _
"|", "/")
CharCode = Array(ChrW(7855), ChrW(7857), ChrW(7859), ChrW(7861), ChrW(7863), ChrW(7845), ChrW(7847), _
ChrW(7849), ChrW(7851), ChrW(7853), ChrW(7871), ChrW(7873), ChrW(7875), ChrW(7877), ChrW(7879), _
ChrW(7889), ChrW(7891), ChrW(7893), ChrW(7895), ChrW(7897), ChrW(7899), ChrW(7901), ChrW(7903), _
ChrW(7905), ChrW(7907), ChrW(7913), ChrW(7915), ChrW(7917), ChrW(7919), ChrW(7921), ChrW(225), _
ChrW(224), ChrW(7843), ChrW(227), ChrW(7841), ChrW(259), ChrW(226), ChrW(273), ChrW(233), ChrW(232), _
ChrW(7867), ChrW(7869), ChrW(7865), ChrW(234), ChrW(237), ChrW(236), ChrW(7881), ChrW(297), ChrW(7883), _
ChrW(243), ChrW(242), ChrW(7887), ChrW(245), ChrW(7885), ChrW(244), ChrW(417), ChrW(250), ChrW(249), _
ChrW(7911), ChrW(361), ChrW(7909), ChrW(432), ChrW(253), ChrW(7923), ChrW(7927), ChrW(7929), ChrW(7925))
cnt = 0
For i = LBound(sarr) To UBound(sarr) Step 1
cnt = cnt + 1
If cnt = 1 Then
ReDim kytuarr(1 To cnt)
Else
ReDim Preserve kytuarr(1 To cnt)
End If
kytuarr(cnt) = sarr(i)
Next i
For i = LBound(CharCode) To UBound(CharCode) Step 1
cnt = cnt + 1
If cnt = 1 Then
ReDim kytuarr(1 To cnt)
Else
ReDim Preserve kytuarr(1 To cnt)
End If
kytuarr(cnt) = CharCode(i)
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = UCase(CharCode(i))
Next i
'A->Z, a->z
For i = 65 To 90 Step 1
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = Chr(i)
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = LCase(Chr(i))
Next i
'tab
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = vbTab
'Dau xuong dong
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = Chr(10)
cnt = cnt + 1
ReDim Preserve kytuarr(1 To cnt)
kytuarr(cnt) = Chr(13)
End Sub