我给你一个繁体和简体的互相转换的函数Function GBBIG5(sStr As String, iConver As Integer) As String On Error Resume Next Dim STR If iConver = 1 Then 'BIG5-->GB STR = StrConv(sStr, vbFromUnicode, &H804) GBBIG5 = StrConv(STR, vbUnicode, &H404) ElseIf iConver = 2 Then 'GB-->BIG5 STR = StrConv(sStr, vbFromUnicode, &H404) GBBIG5 = StrConv(STR, vbUnicode, &H804) End IfEnd FunctionPrivate Sub Command1_Click() Text2.Text = GBBIG5(Text1.Text, 2) End SubPrivate Sub Command2_Click() Text1.Text = GBBIG5(Text2.Text, 1) End Sub
On Error Resume Next
Dim STR
If iConver = 1 Then 'BIG5-->GB
STR = StrConv(sStr, vbFromUnicode, &H804)
GBBIG5 = StrConv(STR, vbUnicode, &H404)
ElseIf iConver = 2 Then 'GB-->BIG5
STR = StrConv(sStr, vbFromUnicode, &H404)
GBBIG5 = StrConv(STR, vbUnicode, &H804)
End IfEnd FunctionPrivate Sub Command1_Click()
Text2.Text = GBBIG5(Text1.Text, 2)
End SubPrivate Sub Command2_Click()
Text1.Text = GBBIG5(Text2.Text, 1)
End Sub