Unable to set installed property of addin

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a custom add-in I wrote that I want loaded up when another excel file
is loaded. My code:

Dim o As Excel.AddIn

For Each o In Application.AddIns
If o.Name = "Planner.xla" Then
o.Installed = true
Exit For
End If
Next

However, when it tries to set the Installed property, it raises an error:

Runtime error 1004: Unable to set the installed property of the add-in
class.

Any suggestions on what to look for?
 
Looks like your Addin is not "registered"

Someone else will post more eloquently but, just cause you save as an addin
doesn't add it to the addin collection. (somewhere in a library)
If isaddin = true then all you need to do is open the file to load it.
In the "other file" open_event - just add code to open your addin file

if you want it to show up in Addin listing for user to uninstall then repost
and i'll look it up
 
Off the top of my head I think you need to use the set statement...

set o.installed = true
 
The Installed property is simply a Boolean property, so you don't
use Set.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top