我有 2 个环境,一个是企业版MS Office 365 应用程序,另一个是专业版 plus 2016。 宏代码在企业版 MS Office 365 应用程序中运行良好,但在 Selection.Find 功能的专业版 plus 2016 中面临“下标超出范围”异常.
调试时注意到 xlFormulas2 为空,这可能导致错误,但不确定为什么 xlFormulas2 在专业加 2016 中为空,但在其他环境中正常工作的 -4185。
Sub AA_01_Spring_China_Individual()
sNumber = InputBox("Which week you would like to update?", "Week No:")
sResponse = "Week " & sNumber
Sheets("BD Calls").Select
Columns("A:A").Select
Selection.Find(What:="Beijing", After:=ActiveCell, LookIn:=xlFormulas2, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate