I open a spreadsheet I want to work with when my program loads using the code below. Each time i execute my code to perform some calculations on the spreadsheet a new instance of Excel is opened. How do i stop a new instance of Excel opening when I execute my code?
Thanks.
Code:Private Sub Form_Load() oXLApp.Workbooks.Open FileName:=App.Path & "" & "OSPREY.xls", Notify:=True oXLApp.Sheets("LBOP-New Capital p.a" ).Select End Sub


Reply With Quote