Excel VBA 创建和关闭 Application 实例

目录
  • 创建 Excel 应用实例
'create new excel application object  
Set app = New Excel.Application  
'set the applications visible property to false  
app.Visible = False '默认就是隐藏窗口。可以省略掉此行奢者
  • 关闭 Excel 应用实例
'close the application  
app.Quit
'release outstanding object references
Set app = Nothing