作者: cola 时间: 2007-1-16 01:30
时间关系,我简单地整理了一下,也不知道是否合适你要求.
Sub X()
Dim C As Range
Dim FirstAddress
PO_number = Sheet1.Cells(16, 2).Value
If PO_number = "" Then Exit Sub
Application.ScreenUpdating = False
With Sheet1.Range("D")
Set C = .Find(What:=PO_number, LookIn:=xlFormulas, SearchOrder:=xlByColumns, LookAt:=xlWhole)
If Not C Is Nothing Then
FirstAddress = C.Address
Do
MsgBox C.Address(0, 0) & "位置找到符合记录"
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> FirstAddress
End If
End With
Application.ScreenUpdating = True
End Sub作者: andy_zjhzd3m 时间: 2007-1-16 05:38
呵呵呵!谢谢了这位大侠,我试看看运行速度[em07]