我试验过了,好像还是不行啊。代码如下: Range("B17").Select Dim daycount As Integer Dim n As Integer Dim day As String Dim daylist(30) As String Dim C As Range daycount = Worksheets("Setting").Cells(14, 2).value For n = 1 To daycount daylist(n - 1) = Worksheets("Setting").Cells(14 + n, 2).value Set C = Worksheets("Schedule").Range("A17:A" & CStr(dcount)).Find(DateTime.DateValue(daylist(n - 1)), LookIn:=xlValues) If Not C Is Nothing Then .... .... End If Next n Worksheets("Schedule")表中,A17:A317中,A17为2009-3-11,A18=A17+1(显示为2009-3-12),A19=A18+1(显示为2009-3-13),... ... Worksheets("Setting")表中,B15:B17,分别为2009-5-1,2009-5-2,2009-5-3。 格式都是日期格式。但是收索的结果集C 始终为nothing。请教怎么解决这个问题?谢谢。
|