Dzwebs.Net

撰写电脑技术杂文十余年

GBA转换为汉字的代码

Admin | 2013-12-16 14:40:13 | 被阅次数 | 4883

温馨提示!

如果未能解决您的问题,请点击搜索;登陆可复制文章,点击登陆

  Dim f As String

  Dim chkOptn As Boolean

    Dim bArr(0 To 1) As Byte

    Dim sMe As String

    Dim Tile As String

    Dim Message As String

    Dim Default As String

    Default = "B0A1"

    Title = "Enter GBK code"

    Message = "Range 8140 to FEA0"

    Do While Not chkOptn

      f = InputBox(Message, Title, Default)

      f = Trim(f)

      If f = "" Then Exit Sub

    If Len(f) <> 4 Then

      MsgBox "Length of Value Entered must be 4."

    Else

       chkOptn = True

    End If

  Loop

  bArr(0) = CInt("&H" + Mid(f, 1, 2))

  bArr(1) = CInt("&H" + Mid(f, 3, 2))

  sMe = StrConv(bArr, vbUnicode, &H804)

  Selection.TypeText Text:=sMe


该杂文来自: Word杂文

上一篇:word Excel2007双面打印有绝招

下一篇:Unicode转换为汉字

网站备案号:

网站备案号:滇ICP备11001339号-7

版权属性:

Copyright 2007-2021-forever Inc. all Rights Reserved.

联系方式:

Email:dzwebs@126.com QQ:83539231 访问统计