Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Installing vba CONVERTERS | Excel Discussion (Misc queries) | |||
installing new program | New Users to Excel | |||
Error when installing Add-ins | Excel Discussion (Misc queries) | |||
Installing MS Office | New Users to Excel | |||
self-installing add-in? | Excel Programming |