-
Solved: Excel Addin AddInInstall()
My AddinInstall() isn't executing when I install the AddIn.
There are two modules. Module2 contains the SCQFormOld macro. Module1 is below.
Any ideas why the AddinInstall isn't creating the ToolBar when the Addin is installed? While in VBA, I can execute Workbook_AddinInstall() and it builds the ToolBar.
[VBA]
Private Sub Workbook_AddinInstall()
Application.CommandBars.Add(Name:="SCQForm").Visible = True
With Application.CommandBars("SCQForm").Controls.Add
.FaceId = 364
.Tag = "SCQ Form V2"
.Caption = "SCQ Form V2 -> OSum V1"
.OnAction = "SCQFormOld"
End With
Application.StatusBar = "Addin Successful. SCQForm Toolbar now available."
End Sub
Private Sub Workbook_AddinUninstall()
For Each bar In Application.CommandBars
If Not bar.BuiltIn And bar.Name = "SCQForm" Then bar.Delete
Next
End Sub
[/VBA]
Edited by GeekGirlau 12-May-06. Reason: insert vba tags
-
Hi Wagnet,
I've edited your post to put vba tags around the code to make it easier to read. When you paste (or type) code into a post, select all the code text and click on the "VBA" button.
-
Is your code in the ThisWorkbook code module?
Most likely it is, but it is possible to have the same code and manually execute it even if it's not in the right module.
-
I think that the code posted above is in Module1; put that code in ThisWorkbook and it should work as it does when manually executed upon installation.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules