Hello All,
Its been sometime since I have been involved here and I have an issue with the loading and unloading of an addin I think.
The code is fired on the host template file to load the add-in as such.
Private Sub Workbook_Open()
AddIns("Be").Installed = True
Application.Run ("BE.xlam!WBopen")
End Sub
And subsequently unload the application on closing of the document as such:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.Run ("BE.xlam!WBbeforeclose")
AddIns("Be").Installed = False
End Sub
Once it passes into the application it hangs up at the first statement with a "Run-Time Error '9' Subscript out of Range" error.
If I disable the load and unload features and just leave the addin installed, I have no issues and everything runs fine. It appears that once I have the installed false and true feature, it just hangs up.
Any thoughts to this? (If I use On Error Resume Next throughout all the code, it ultimatly works, but I am not sure if that is an appropriate solution).