在访问 vba 中,如果我尝试手动步进代码,它会工作 2-3 行,然后执行其余部分而不步进

问题描述

我正在尝试通过单步调试代码,但单步调试适用于 2 行,然后运行其余代码。我在以 IF 语句开头的行上放了一个中断,当我通过 F8 步进时,它一次前进 1 行,但在 TempVars!log_susr 行之后中断结束,代码继续,就像我按下 F5 一样。

    If mybrowser.Document.Forms("sapmzps_0000004_100").all("CAUFVD-AUFNR").Value <> "?" Then

    mybrowser.Document.Forms("loginForm").all("Sap-user").Value = TempVars!log_susr ***Steps to this line then executes the rest of code without stepping.***
    mybrowser.Document.Forms("loginForm").all("Sap-password").Value = TempVars!log_spwd
    mybrowser.Document.Forms("loginForm").all("sap-language").Value = "Fr"
    Debug.Print "got here first! "

    mybrowser.Document.Forms("loginForm").submit
 
Else
    Debug.Print "got here second! "


End If

皮特

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)