Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Unable to set installed property of addin

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Unable to set installed property of addin

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


"polandjc" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default Unable to set installed property of addin

Off the top of my head I think you need to use the set statement...

set o.installed = true
--
HTH...

Jim Thomlinson


"polandjc" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Unable to set installed property of addin

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


"Jim Thomlinson" wrote in message
...
Off the top of my head I think you need to use the set
statement...

set o.installed = true
--
HTH...

Jim Thomlinson


"polandjc" wrote:

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?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Unable to set installed property of addin

Polandjc -

just because you saved asaddin does not mean that the file is (or needs to
be0 in the Addins collection.

Do you want the user to be able to select and launch the addin with other
files or only with your file?

General purpose addins should be added to teh Addins collection
addins.add " filepath/name" - puts it in visible list
then installed - checks teh box

Your's sounds like a special purpose addin so i would think that if you save
asaddin and have the associated file open event open the addin and the file
close event close the addin file you should get where you need to be.

"Chip Pearson" wrote:

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


"Jim Thomlinson" wrote in message
...
Off the top of my head I think you need to use the set
statement...

set o.installed = true
--
HTH...

Jim Thomlinson


"polandjc" wrote:

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?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Unable to set installed property of addin

According to the documentation:

Set the Installed property of the add-in to True to install the add-in. To
install an add-in that doesnt appear in the list of available add-ins, you
must first use the Add method and then set the Installed property.

The add-in appears on the list so I shouldn't need to register it. The
IsAddin Property appears to be a read only property. Any other ideas? I tried
doing a Workbooks.Open on it that does load the Addin.

Jim

"Vacation's Over" wrote:

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


"polandjc" wrote:

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?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Unable to set installed property of addin

Thanks! I wondered if just opening it would be OK.

"Vacation's Over" wrote:

Polandjc -

just because you saved asaddin does not mean that the file is (or needs to
be0 in the Addins collection.

Do you want the user to be able to select and launch the addin with other
files or only with your file?

General purpose addins should be added to teh Addins collection
addins.add " filepath/name" - puts it in visible list
then installed - checks teh box

Your's sounds like a special purpose addin so i would think that if you save
asaddin and have the associated file open event open the addin and the file
close event close the addin file you should get where you need to be.

"Chip Pearson" wrote:

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


"Jim Thomlinson" wrote in message
...
Off the top of my head I think you need to use the set
statement...

set o.installed = true
--
HTH...

Jim Thomlinson


"polandjc" wrote:

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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installed Addin file opens when it shouldn't Aaron Excel Discussion (Misc queries) 3 February 6th 08 11:13 PM
Installed property Rights tool, now I cant edit hyperlinks! Your Worst Newbmare Excel Discussion (Misc queries) 0 July 24th 07 07:50 PM
Unable to set the XValues Property Ali Baba Charts and Charting in Excel 2 September 14th 05 04:54 AM
unable to set hidden property davegb Excel Programming 2 March 22nd 05 12:03 AM
Unable to get VLOOKUP property cici Excel Programming 1 February 10th 04 11:24 PM


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"