View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Application Close Event


"Peter T" wrote in message

just this bit -

A bit more - contrary to what I speculated previously (see below), even
having registered the dll, added the correct registry entries, doing the
ComAddins.Update will add the addin to the collection but it will not

cause
the addin to load. I assume there is a way to programatically load it but
not sure how. In effect it would mean waiting for the next time Excel

starts
for the addin to auto load.


I wasn't thinking - after adding the registry entries and doing the
Regsrv32:

Sub LoadCAITest()
Dim cai As COMAddIn
Application.COMAddIns.Update
For Each cai In Application.COMAddIns
If cai.Description = "Test Excel Shutdown" Then
cai.Connect = True
Exit For
End If
Next
End Sub

Regards,
Peter T