Hi,

I am trying to open a workbook and run a macro from C#. I get an error
when I try to run the data analysis macro.
I don't get this error when I manually open the workbook and run the
macro.

- I've made sure the analysis toolpak for VBA add-in is actually
loaded, but I get the following error:
"The macro '' cannot be found"

Here's the code:

'make sure the addins are loaded
Dim iCount As Integer
For iCount = 1 To Application.AddIns.Count
If UCase(Application.AddIns(iCount).Installed) Then
Application.Workbooks.Open
(Application.AddIns(iCount).FullName)
End If
Next iCount

Application.Run "ATPVBAEN.XLA!Histogram", Range("I20:I65536"), _
Range("O19"), _
Range("M20:M50"), False, False,
False, False