dok001 发表于 2011-12-29 07:47 ![](static/image/common/back.gif)
调试显示在下列最后一行:
Private Sub CommandButton1_Click()
Dim M As String
用on error语句处理match产生的#N/A值.
或者用下面的方法达到同样的目的.
Set Rng = Range("A1:A500").Find(m, , xlValues, xlWhole)
If Rng Is Nothing Then
MsgBox "没有匹配值"
Else
n = Rng.Row
End If