Wednesday, May 27, 2020

Excel VBA List Addin



Sub ListAddins()
    Dim adn As AddIn
    Dim rng As Range
    Dim lastRow As Long

    If MsgBox("Do you want to continue?", vbInformation + vbOKCancel, "Addins Info") Then
        lastRow = sheetA.UsedRange.Rows.Count + 1
        sheetA.Range("A1:C" & lastRow).Clear
        Set rng = Range("A2")
        For Each adn In Application.AddIns
            rng = adn.FullName
            rng.Offset(, 1).Value = adn.Installed
            rng.Offset(, 2).Value = adn.IsOpen
            Set rng = rng.Offset(1)
        Next
        sheetA.Range("A1") = "Path of the Add-in"
        sheetA.Range("B1") = "Installed"
        sheetA.Range("C1") = "Available"
        sheetA.Range("A2").CurrentRegion.Borders.LineStyle = 1
        sheetA.Range("A1:C1").Font.Bold = True
    End If

End Sub

No comments:

Post a Comment

Hot Topics