从VBS文件关闭Visio


甲基蓝
2025-03-19 02:49:38 (4小时前)
  1. 目前我打开


Visio中
</跨度>
从VBS文件,并做好工作。但是,每次宏结束时,Visio.exe仍然在任务管理器下的“活动进程”中。

问题是,当我多次运行宏,时,我得到多个Visio.exe就坐在那里。

我怎样才能有效地关闭

Visio中
</跨度>
文件(因此终止过程)?

这是我的代码:

Sub MacroExample()

  1. 昏暗的AppVisio
  2. 设置

2 条回复
  1. 0# 阿政ღ | 2019-08-31 10-32



    这个问题的答案是重新排列代码




    1. vsoDoc.close
      appvisio.quit

    2. put this at the end instead of beginning
      Set vsoDoc = Nothing
      set AppVisio = nothing

    3. </code>

登录 后才能参与评论