使用find函数报错
碰到紧急问题,请各位高手帮忙!!2次查找不同数据时,第二次查找报错--运行时错误 91。
Dim rng_sRow As Range
Dim rng_sCol As Range
Dim wbObj As Object
Dim xlWorkbook As Workbook
Dim xlSheet As Worksheet
Set wbObj = CreateObject("Excel.Application")
Set xlWorkbook = wbObj.Workbooks.Open("FILE.NAME", 2)
Set xlSheet = xlWorkbook.Worksheets(sSheet)
Set rng_sRow = xlSheet.Cells.Find(What:="XXX", LookAt:=xlWhole)
sRow = rng_sRow.Row
'以上一切正常
'以下这句报错
Set rng_sCol = xlSheet.Cells.Find(What:=DateValue("2009-1-24"), LookAt:=xlWhole)
比较急,请大侠们帮忙啊!!! --------------------编程问答-------------------- 我的博客论坛有关于这个问题的www.yltyu.com
补充:VB , 基础类