我有2个名为Client.xls和Host.xlam
的工作簿目标如下
出于某种原因,当我运行此过程时,主机添加是否保持打开状态?
这是我的代码
Client.xls
Private Sub Workbook_Open()
MsgBox ("Open Host")
Workbooks.Open ("C:\Users\nggmgwr\Desktop\Host test\Host.xlam")
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
MsgBox ("Close Host")
Workbooks("Host.xlam").Close
End Sub
Host.xlam
Private Sub Workbook_Open()
MsgBox ("Close Client")
Workbooks("Client.xls").Close
End Sub