Question Excel call .xla file

Joined
Jan 5, 2009
Messages
8
Programming Experience
Beginner
Hi, I had the following code:

VB.NET:
Dim xlApp As Excel.Application = Nothing
                    Dim xlWorkBooks As Excel.Workbooks = Nothing
                    Dim xlWorkBook As Excel.Workbook = Nothing
                    Dim xlCells As Excel.Range = Nothing
                    xlApp = New Excel.Application
                    xlApp.DisplayAlerts = False
                    xlWorkBooks = xlApp.Workbooks
                    xlWorkBook = xlWorkBooks.Open("C:\Excel1.xls")
                    xlApp.Visible = True

                    xlApp.Run("P:\MASTER\EntFunc2.xla")

I am trying to call EntFunc2.xla and load it into the Excel1.xls but it seems like not successful. May I know how can I really run the xla file in my Excel directly through VB.NET codes?
 
Back
Top