Option Explicit
Dim vbexcel11 As Object
Dim vbbook As Object
Dim Rownum%, str1$, str2$, str3$, str4$, len1%, len2%, len3%, CC$
Private Sub Form_Load()
Set vbexcel11 = CreateObject("Excel.Application") '创建excel对象
vbexcel11.Visible = True '对象可见
Set vbbook = vbexcel11.Workbooks.Open("c:\tt.xls") '打开文件
Me.Caption = "Excell 读取"
End Sub
Public Function CBMmid(ByVal Tstr As String, Start As Integer, Optional leng As Variant) As String
CC = IIf(IsMissing(leng), StrConv(MidB(StrConv(Tstr, vbFromUnicode), Start), vbUnicode), StrConv(MidB(StrConv(Tstr, vbFromUnicode), Start, leng), vbUnicode))
CBMmid = CC
End Function
Public Function CBMstrLen(Wstr$) As Long
CBMstrLen = LenB(StrConv(Wstr, vbFromUnicode))
End Function