Imports LateBindingApi.Core
Imports NetOffice.ExcelApi
Imports ExcelDna.Integration

' This class is implemented only to allow us to initialize NetOffice
' We hook up a public field in the Module AddInMain 
'    that will be usable anywhere in the project.
Public Class AddIn
    Implements IExcelAddIn

    Public Sub AutoOpen() Implements IExcelAddIn.AutoOpen
        Factory.Initialize()
        ' Set a public field in the GlobalHelper module, so that Application will be available everywhere.
        Application = New Application(Nothing, ExcelDnaUtil.Application)
    End Sub

    Public Sub AutoClose() Implements IExcelAddIn.AutoClose

    End Sub
End Class
