easy one!

  • Thread starter Thread starter MD
  • Start date Start date
M

MD

I have a blank,

What is the code to start a new EXCEL application. Independant from the
first one that is opned ?

thx

Michel
 
Hi,

Try this

Public Sub NewExcelWindow()
Set objexcel = New Excel.Application
objexcel.Visible = True
End Sub

Good Luck
ross
 
Thx Ross but I guess I wasn't clear in my request.

I want to open the EXCEL application BUT with a new workbook in it. If I
use your code, as soon as the sub ends, the application closes also. I wish
for the worbook to remain open. In other words, have 2 independant sessons
of EXCEL running.

Michel
 
Michel,

sorry.

add this in the declarations section of the module

Global objexcel as Excel.Application

also update other code to

Public Sub NewExcelWindow()
Set objexcel = New Excel.Application
objexcel.Visible = True
objexcel.Workbooks.Add

End Sub

which will open a new book aswell


good Luck
ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top