方法1.
Private Sub Command1_Click()
MsgBox LenB(StrConv("中国人民万岁long live chinese", vbFromUnicode))
End Sub
方法2(use api).
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Private Sub Command1_Click()
MsgBox lstrlen("中国人民万岁long live chinese")
End Sub
Private Sub Command1_Click()
MsgBox LenB(StrConv("中国人民万岁long live chinese", vbFromUnicode))
End Sub
方法2(use api).
Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Private Sub Command1_Click()
MsgBox lstrlen("中国人民万岁long live chinese")
End Sub
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货