Opening an Excel file with an Add-in

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Susan Kobayashi
    New Member
    • Sep 2010
    • 1

    #1

    Opening an Excel file with an Add-in

    I need to open up an excel file that has API formulas in it, let the data fill in and save it. Starting with just the file opening step, I use the following code:

    Sub OpenExcelFile_C lick()

    Dim objXLApp As Object
    Dim objXLBook As Object
    Set objXLApp = CreateObject("E xcel.Applicatio n")
    Set objXLBook = objXLApp.Workbo oks.Open("C:\Co rp Info.xls")
    objXLApp.Applic ation.Visible = True

    End Sub

    The problem is that the key add-in I need somehow doesn't open when I do this so all of my API formulas show up as "NAME?". If I open up Excel or the spreadsheet manually all is fine. How do I specify that a specific add-in open with the spreadsheet?

    Thanks.
Working...