ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   easy one! (https://www.excelbanter.com/excel-programming/300987-easy-one.html)

MD

easy one!
 
I have a blank,

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

thx

Michel



Tom Ogilvy

easy one!
 
Look at the createobject method.

--
Regards,
Tom Ogilvy

"MD" wrote in message
.. .
I have a blank,

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

thx

Michel





ross

easy one!
 
Hi,

Try this

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

Good Luck
ross


"MD" wrote in message ...
I have a blank,

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

thx

Michel


MD

easy one!
 
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


"ross" wrote in message
om...
Hi,

Try this

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

Good Luck
ross


"MD" wrote in message

...
I have a blank,

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

thx

Michel




ross

easy one!
 
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


All times are GMT +1. The time now is 02:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com