Can't call COM Add-in from VBA (Excel)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MrTed
    New Member
    • Jul 2010
    • 1

    #1

    Can't call COM Add-in from VBA (Excel)

    Hi Folks,

    I'm new to the land of VBA and wonder if someone can help me:

    I have an excel add in dll that contains a number of functions etc. I can call these functions from the sheet directly with no problem using syntax such as:

    Code:
    =MyRoutine("String1", "String2", True, "String3")
    However, when I call this routine from my VBA code I get an "Automation error Unspecified error" message. The syntax I use is:

    Code:
    Application.Run "MyRoutine", "String1", "String2", True, "String3"
    The add-in is installed correctly but I keep getting the error I've been scratching my head for a couple of days with this problem - anyone have any iseas what I'm doing wrong?

    Any help is greatly appreciated,

    MrTed
Working...