'create an app object only once
If qtApp = Nothing then
Set qtApp = Nothing then
End if
'qtApp.Test.Settings.Run.EndIteration = 6 in your case
If Environment("TestIteration") = qtApp.Test.Setting.Run.EndIteration Then
MsgBox "This is the last iteration!"
Set qtApp = Nothing
End if

本文介绍如何使用单例模式创建QtApp对象,并确保在整个应用中仅存在一个实例。此外,还探讨了如何设置迭代次数并在达到最后一次迭代时进行特定操作。

被折叠的 条评论
为什么被折叠?



