……=LenB(StrConv(TextBox.Text,vbFromUniCode))

解决方案 »

  1.   

    Pravite Sub Textbox_keydown((KeyCode As Integer, Shift As Integer))if keycode=13 then
      msgbox len(textbox.text)
    endifEnd Sub
      

  2.   

    Pravite Sub Textbox_keypress((KeyCode As Integer, Shift As Integer))
    if keycode=13 then
      msgbox len(textbox.text)
    endif
    End Sub
     
      

  3.   

    Private Sub Text1_KeyPress(KeyAscii As Integer)
       if KeyAscii=vbKeyReturn Then
           Text1.Text=lenB(trim$(Text1.Text))
           KeyAscii=0
       End If
    End Sub
      

  4.   

    ●Len(传回字串有多少字数)
        MyVal = Len(MyStr)
        MyVal = Len("倩倩的VB网站")
        MyVal = 7     ●LenB(传回字串有多少字符)
        MyVal = LenB(MyStr)
        MyVal = LenB("倩倩的VB网站")
        MyVal = 14 
      

  5.   

    这样:
    Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
      MsgBox LenB(StrConv(text1.text, vbFromUnicode))
    End If
    End Sub
      

  6.   

    '字节数
    Private Sub Text1_KeyPress(KeyAscii As Integer)
       if KeyAscii=13 Then
           Text1.Text=lenB(Text1.Text)
           
       End If
    End Sub
    '字数
    Private Sub Text1_KeyPress(KeyAscii As Integer)
       if KeyAscii=13 Then
           Text1.Text=len(Text1.Text)
           
       End If
    End Sub