标题:VB 查找EXCEL 内容其值为空,报错求帮助
只看楼主
waiwaimu
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-4-13
 问题点数:0 回复次数:0 
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中内容 找不到时就会出现报错
搜索更多相关主题的帖子: 搜索 EXCEL 
2013-04-13 09:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-404054-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.220054 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved