#1   Report Post  
moglione1
 
Posts: n/a
Default Open Excel using VBA


Hi all,

Can somebody please provide me with the VBA code that opens a new Excel
Application and not Excel Workbook.

I.e. I need two instances of Excel running - 1 that contains the code
to open the second instance.

THANKING YOU ALL


--
moglione1
------------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=480809

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default Open Excel using VBA

I'm not sure why you want another instance of excel, but...


Option Explicit
Sub testme()
Dim xlApp As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
End Sub



moglione1 wrote:

Hi all,

Can somebody please provide me with the VBA code that opens a new Excel
Application and not Excel Workbook.

I.e. I need two instances of Excel running - 1 that contains the code
to open the second instance.

THANKING YOU ALL

--
moglione1
------------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=480809


--

Dave Peterson
  #3   Report Post  
moglione1
 
Posts: n/a
Default Open Excel using VBA


Thank you very much for your response but that does not QUITE work.

Basically it does open the other instance of EXCEL. But then it closes
it back down.

Anyway around this at all. I am new to VBA so dont fully understand it
yet.

Thank you very much


--
moglione1
------------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=480809

  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default Open Excel using VBA

What happens if you do something in that instance?

Option Explicit
Sub testme()
Dim xlApp As Object
Dim xlWkbk As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWkbk = xlApp.Workbooks.Add
End Sub

If you don't want that empty workbook hanging around:

Option Explicit
Sub testme()
Dim xlApp As Object
Dim xlWkbk As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = True
Set xlWkbk = xlApp.Workbooks.Add
xlWkbk.Close savechanges:=False
End Sub





moglione1 wrote:

Thank you very much for your response but that does not QUITE work.

Basically it does open the other instance of EXCEL. But then it closes
it back down.

Anyway around this at all. I am new to VBA so dont fully understand it
yet.

Thank you very much

--
moglione1
------------------------------------------------------------------------
moglione1's Profile: http://www.excelforum.com/member.php...o&userid=26414
View this thread: http://www.excelforum.com/showthread...hreadid=480809


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSV formatted files open odly in Excel 2000 Janski Excel Discussion (Misc queries) 3 November 24th 05 07:58 PM
Unable to open excel document across a network. John Excel Discussion (Misc queries) 1 September 30th 05 09:12 PM
Open an existing excel speadsheet, opens Excel but not the file?? Smeeta Geary Excel Discussion (Misc queries) 1 September 19th 05 03:28 PM
How do i open excel doc in works? mdelmatt Excel Discussion (Misc queries) 3 July 8th 05 09:51 PM
External Links on open and Excel 2003 Guardian Excel Discussion (Misc queries) 3 June 16th 05 12:25 AM


All times are GMT +1. The time now is 07:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"