Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default self-installing add-in?

Hello all...

I was wondering, as i've created an add-in to distribute to a few (not very
computer savvy) colleagues at my office, how to properly install the add-in
....

I tried putting

if addins("myaddin").installed = false then addins("myaddin").installed =
true

in the workbook open sub, thinking that then my colleagues can just
double-click on the xla file to open it and have it self-install. And it
works! complete with 40 or so loops through the workbook_open() and
workbook_addininstall() subroutines.... and of course, that's a problem
because the workbook_addininstall() sub adds a button to the worksheet menu
bar, so 40 loops = 40 new buttons tacked on (visually, not all that
appealing for the end-user).

It seems like you have to wait or something for the addins collection to
list the add-in as installed?

Anyone know what I'm doing wrong?

TIA.

Option Explicit
Public ctlTidy As CommandBarButton
Dim BarOne As New clsToolbar


Private Sub Workbook_AddinInstall()
Set ctlTidy = InitButton ' initbutton is a function that returns a
commandbarbutton object
End Sub

Private Sub Workbook_AddinUninstall()
Set BarOne.WorksheetBar = Nothing
On Error Resume Next
ctlTidy.Delete
On Error GoTo 0
End Sub

Private Sub Workbook_Open()
Set BarOne.WorksheetBar = Application.CommandBars

If AddIns("tidyproductionreport").Installed = False Then
AddIns("tidyproductionreport").Installed = True


End Sub


TIA

--

__________________________________________________ __________________________
________________
Please reply to newsgroup so everyone can benefit.
Email address is not valid (see sparkingwire.com)
__________________________________________________ __________________________
________________




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
Installing vba CONVERTERS jimbo345 Excel Discussion (Misc queries) 1 April 8th 08 02:26 PM
installing new program worknpoman New Users to Excel 1 July 12th 07 07:55 AM
Error when installing Add-ins Tinus Excel Discussion (Misc queries) 3 April 26th 05 06:16 PM
Installing MS Office [email protected] New Users to Excel 3 March 24th 05 04:29 PM
self-installing add-in? Mike[_37_] Excel Programming 5 August 22nd 03 04:42 PM


All times are GMT +1. The time now is 07:56 PM.

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

About Us

"It's about Microsoft Excel"