Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果大小写不正确,我的 find 命令找不到记录这是我使用的命令:
Do Until Cells(i, j) = txttno i = i + 1 If Cells(i, j) = "" Then MsgBox ("Record does not exist") Exit Sub End If Loop
因此,当我想查找 ex:“P-100”时,我必须输入“P-100”,当我输入“p-100”时它将不起作用。
该Range.find命令保存每个参数的设置,就像FindExcel 中的对话框一样。
Range.find
Find
VBA 帮助推荐
如果下次调用该方法时没有为这些参数指定值,则使用保存的值。设置这些参数会更改“查找”对话框中的设置,而更改“查找”对话框中的设置会更改在省略参数时使用的保存值。为避免出现问题,请在每次使用此方法时显式设置这些参数。
有可能您上次Find在 Excel 或 VBA 中使用时进行了区分大小写的搜索,并且此设置已保留在您的 VBA 调用中。