tags:

views:

161

answers:

1

I need to make an Excel add-in active/run at workbook startup....need code

The add-in with parameter is: "OPCS7200ExcelAddin.XLA!StartOPC"

Have been given this code:

Private Sub Workbook_Open()

Call Excel.Application.Run("OPCS7200ExcelAddin.XLA!StartOPC")

End Sub

does not work

help??

A: 

Hi Mike,

I've just got similar code to work on my machine (Excel 2003, XP). Not knowing whether you get any error message, I could suggest the following I guess:

1) Ensure that you have the xla add-in loaded when your workbook goes to open.

2) Alternatively, add a reference to your XLA and call the code directly:

Private Sub Workbook_Open()
    OPCS72000ExcelAddin.StartOPC
End Sub

Regards,

Chris

Chris Spicer