|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
dudebad 发表于 2011-11-30 12:10
您 2014-11-17 15:56 Private Sub Name1_Change()
Dim rng As Range
If Plan2110.Value = "" Then
MsgBox ("Please Enter Plan Date!!!")
Exit Sub
End If
With Sheets("Resursce")
Set rng = .Range("a:a").Find(what:=Plan2110.Text, LookIn:=xlValues)
Set rng1 = rng.Rows.Find(what:=Name1.Text, LookIn:=xlValues)
If rng Is Nothing And rng1 Is Nothing Then
MsgBox ("mei you ci ren, please check!!!")
Exit Sub
End If
If Not rng Is Nothing And Not rng1 Is Nothing Then
If rng1.Offset(, 1).Value + rng1.Offset(, 2).Value >= CT2110.Value Then
MsgBox ("ci ren shi jian bu ke yong !!!")
End If
End If
End With
end sub.
我想用plan2110.text 的值在A列中查找,同时找到后在用name1.text 的值查找(在plan2110.text 这一行查找代码怎么写?谢谢
我写的这个代码Set rng1 = rng.Rows.Find(what:=Name1.Text, LookIn:=xlValues)好像有问题,运行不了,请帮忙看看。 |
|