意外とややこしいのよね
Function ConvStrtoSJISCodeStr(aSJISstr As String) As String
If Len(aSJISstr) < 2 Then
Exit Function
End If
Dim aryByte() As Byte
ReDim aryByte(Len(aSJISstr) / 2 - 1)
Dim i
i = 0
Do
If Len(aSJISstr) <= 0 Then
Exit Do
End If
Dim bHex As Byte
bHex = Int("&H" & Left(aSJISstr, 1)) * 16 + Int("&H" & Mid(aSJISstr, 2, 1))
aSJISstr = Right(aSJISstr, Len(aSJISstr) - 2)
aryByte(i) = bHex
i = i + 1
Loop
ConvStrtoSJISCodeStr = StrConv(aryByte, vbUnicode)
End Function