View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How to open a new instance of EXCEL and .xls file

LOL! Yes, my code will do that.

This bit

'...

is where you should do what you want to do. If you don't want to do
anything, just have the extar instance of Excel, remove


Set oWB = Nothing
oXL.Quit
Set oXL = Nothing

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Launchnet via OfficeKB.com" <u20911@uwe wrote in message
news:73ca036d9d0fa@uwe...
Good Morning Bob

Thanks for Macro, But I do have a problem. First, I copied the code
directly
to my macro sheet. The code in Macro is now:

Sub NewExcel()
Dim oXL As Object
Dim oWB As Object

Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
Set oWB = oXL.Workbooks.Open("C:\documents and settings\default\my
documents\computerclasshandouts.xls")
'...
Set oWB = Nothing
oXL.Quit
Set oXL = Nothing
End Sub


When I click on my macro, it opens a new instance of Excel and the desired
file (which I can see for a moment, but then it immediately closes and I
only
have my original worksheet.

Any ideas would be appreciated.

Thanks
Matt@Launchnet

Bob Phillips wrote:
Sub NewExcel()
Dim oXL As Object
Dim oWB As Object

Set oXL = CreateObject("Excel.Application")
oXL.Visible = True
Set oWB = oXL.Workbooks.Open("C:\myBook.xls")
'...
Set oWB = Nothing
oXL.Quit
Set oXL = Nothing
End Sub

I need a macro that will open a second Excel program and open a specific
file

[quoted text clipped - 7 lines]

Matt @ Launchnet


--
Please take a look at www.openoursite.com and you will see how I want to
use.

God Bless for helping

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200706/1