设计器代码,主要是open 事件代码。
Public WithEvents XlApp As Excel.Application
Private Sub AddinInstance_OnConnection(ByVal Application As Object, ByVal ConnectMode As AddInDesignerObjects.ext_ConnectMode, ByVal AddInInst As Object, custom() As Variant)
Set XlApp = Application
End Sub
Private Sub AddinInstance_OnDisconnection(ByVal RemoveMode As AddInDesignerObjects.ext_DisconnectMode, custom() As Variant)
Set XlApp = Nothing
End Sub
Private Sub XlApp_WorkbookOpen(ByVal Wb As Excel.Workbook)
路径 = Wb.FullName
名称 = Wb.Name
End Sub