gpt4 book ai didi

excel - 通过 VBA 在 Excel 中启用 COM 插件

转载 作者:行者123 更新时间:2023-12-02 23:52:47 25 4
gpt4 key购买 nike

我需要通过 VBA 启用 COM 插件。这些插件已存在于 COM 插件下,但在 Excel 崩溃时变为未选中状态。

Sub hyp()
Dim objAddIn As Object
For i = 1 To Application.COMAddIns.Count

Set objAddIn = Application.COMAddIns.Item(i)
On Error Resume Next
If Application.COMAddIns.Item(i).Description = "Oracle Smart View for Office" Then
'MsgBox Application.COMAddIns.Item(i).Description
'NEED TO ENABLE THE COM ADDIN

Else
End If
Next i
End Sub

最佳答案

Public Sub Connect_COM_AddIn(Name As String)

Dim ndx As Integer

For ndx = 1 To Application.COMAddIns.Count
If Application.COMAddIns(ndx).Description = Name Then
Application.COMAddIns(ndx).Connect = True
Exit For
End If
Next
End Sub

关于excel - 通过 VBA 在 Excel 中启用 COM 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48565694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com