PDA

View Full Version : Solved: Activate the Add-In Screen with VBA



Shred Dude
09-01-2011, 09:51 AM
Can someone point me down the right path to be able to activate the ADD-In screen with VBA. I simply want to be able to pop up the Add In screen with one routine so as to avoid the multiple mouse clicks of (in Excel 2007)..

Office Button>Excel Options>Add-Ins>Go...(after making sure Excel Add INs is in the Manage: box)

This produces the Add-Ins window with the list of available Add-Ins.

Perhaps an API that I can use to trigger that window?

Kenneth Hobs
09-01-2011, 10:36 AM
Application.Dialogs.Item(xlDialogAddinManager).Show

Shred Dude
09-01-2011, 11:06 AM
Awesome. Thank you.

Looks like I need to familiarize myself with that XlBuiltInDialog Enumeration.

Bob Phillips
09-01-2011, 11:16 AM
SendKeys "%TM"

Shred Dude
09-01-2011, 11:24 AM
Thanks XLD.

I found that the dialogs.show method fails if there is no activeworkbook, so I wrapped it as follows:

If Not ActiveWorkbook Is Nothing Then
Application.Dialogs.Item(xlDialogAddinManager).Show
End If

I added a button to my Quick Access Toolbar using that code from my Personal macros file. Maybe I'll have it add a workbook if there's not one...

Just a convenience thing for me.

visible2you
09-01-2011, 12:48 PM
SendKeys "%TM"



Hi,

I tried it. I think it did not work.


Private Sub Workbook_Open()
'Application.Dialogs.Item(xlDialogAddinManager).Show
ThisWorkbook.Worksheets(1).Activate
Application.SendKeys ("%tmsm~")
Application.SendKeys ("%{F11}")
'SendKeys "%TI"
End Sub

Shred Dude
09-01-2011, 05:39 PM
The send keys %TM does not pull up the Add-In manager. The show dialog code shown above does.