VB 查找EXCEL 内容其值为空,报错求帮助
Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook
Dim xlSheet As New Excel.Worksheet
Dim filepath As String
Dim h As Integer
Dim q As Integer
Private Sub Command1_Click()
q = xlSheet.Range("1:100").Find("单据号码").Column '搜索范围
h = xlSheet.Range(Chr$(q + 64) + "1:" + Chr$(q + 64) + "100").Find(Text1.Text).Row '搜索范围
end
当Text1.Text中内容 找不到时就会出现报错