你可以用Lenb这个函数啊,它可以取出字节数,举例如下:
    Dim strTmp As String
    strTmp = "汉"
    Debug.Print Len(strTmp) & "-" & LenB(strTmp)会生成
1-2不知道能不能解决你的问题:)

解决方案 »

  1.   

    l = Lenb(strconv("slakfdjsd哈哈”“",vbFormUniCode))
      

  2.   

    lenb不解决问题。lenb("a")还是2
      

  3.   

    Public Function lena(a As String) As Long
    Dim I As Long
    Dim j As Long
    j = 0
    For I = 1 To Len(a)
       If Asc(Mid(a, I, 1)) < 0 Then j = j + 1
    Next I
    lena = I + j - 1
    End Function
      

  4.   

    Len 函数
    返回 Long,其中包含字符串内字符的数目.注意   LenB 函数作用于字符串中的字节数据,如同在双字节字符集(DBCS)语言中一样。所以 LenB 返回的是用于代表字符串的字节数,而不是返回字符串中字符的数量。
      

  5.   

    LenB(StrConv(Trim(T1(0).Text), vbFromUnicode)) > 40
      

  6.   

    Lenb(StrConv(YourString,vbFromUnicode))
      

  7.   

    api:GetTextExtentPoint32
    BOOL GetTextExtentPoint32(
      HDC hdc,           // handle to device context
      LPCTSTR lpString,  // pointer to text string
      int cbString,      // number of characters in string
      LPSIZE lpSize      // pointer to structure for string size
    );
    FROM A VC LEARNER
     
      

  8.   

    I'm sorry that i 've mistake your meaning
    sorry
      

  9.   

    返回正确的字长:LenB(StrConv("我的Strings",vbFromUnicode))
    返回值是:12