Runtime Error '-2147451259(80004005)' in VBA When Loading TDMS File in Excel

Updated Mar 28, 2023

Reported In

Software

  • TDM Excel Add-In

Issue Details

I want to automate the opening of files in TDMS format using VBA.
Unfortunately I encounter a runtime error '-2147467259 (80004005)' linked to the use of an add-in which can only be connected by an administrator. 
I used this code : 
Dim obj As COMAddIn
Set obj = Application.COMAddIns.Item("ExcelTDM.TDMAddin")
obj.Connect = True


What can I do to fix this error ?

Solution

There are 2 solutions : 
  • Run Excel with administrator rights
  • Delete this line : obj.Connect = True