Dear Gurus,
I have a project which I'm working on that needs to have an excel file opened during its execution.
Now, I have the following code which is running on each single form:

Code:
Dim xlApp As Excel.Application
Dim xlWorkBook As Excel.Workbook
Dim xlWorkSheet As Excel.Worksheet

        xlApp = New Excel.Application
        xlApp.Visible = False
        xlWorkBook = xlApp.Workbooks.Open("C:\Users\Public\Documents\Modello.xlsm", [ReadOnly]:=False, Editable:=True)

....

xlWorkBook.Close(SaveChanges:=True)
xlApp.Quit()
Is it possible to place the code just once, so that the first part will be executed at the loading of the project (and then I just have to activate the worksheets that I need from time to time), and the last two rows just when I close the project?

Thanks in advance for your help,
A.