VBA – Displaying the available AddIns in Excel

With the current article, I simply present a good way to list all the AddIns you have in MS Office, using VBA.

addIn

 

Pretty much, I declare a string array and I redimensionize it. Then for each addin in the application, I take its name and I save it into a string. At the end I print the string in a msgbox, and because I have used “vbCrLf”, each addin name is on a separate line.

It is really as simple as that. I am sure it can be simpler, but I could not find a way to avoid the array. If you find one – let me know 🙂

Here comes the code:

Sub AddInsCheck()

Dim AddI                    As AddIn
Dim i                       As Integer
Dim counter                 As Integer
Dim vAddIns()              As String
Dim strDisplay              As String

counter = Application.AddIns.Count
ReDim vAddIns(counter)
i = 1

For Each AddI In Application.AddIns.Item
  vAddIns(i) = AddI.Name
  strDisplay = strDisplay & AddI.Name & vbCrLf
  i = i + 1
Next AddI

MsgBox strDisplay, vbCritical, "vit - consulting.com"

End Sub

Keep calm and learn to code! 😀