View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default Test If Add-In Workbook is being Referenced

Ryan, have you tried this; if this does not work let me know...

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Try
Msgbox AddIns("analysis toolpak").Installed

'You can check for the other available Add-Ins
Sub Macro()
For Each myAddin In Application.AddIns
If myAddin.Name = "ATPVBAEN.XLA" Then
MsgBox myAddin.Installed
End If
Next
End Sub



If this post helps click Yes
---------------
Jacob Skaria


"Ryan H" wrote:

I have an Add-In Workbook that contains userforms and code which is
referenced by other workbooks. This is my problem, I may have 4 workbooks
open referencing the add-in wbk. If all those workbooks close, but the Excel
application remains open, my add-in does not close. Is there a way to put
code in the add in wbk to check to see if any workbooks are referencing it
and if not close the add-in?

Thanks in Advance!
--
Cheers,
Ryan