LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Using workbooks.open after new instance of excel application

Basically, i have a workbook that when opened, displays a
userform with three buttons. (I only need the first one.)
When this button is pressed it will open up another excel
application and workbook.

'--------------------------------------------
Private Sub CommandButton1_Click()
Dim xlApp As Object
Set xlApp = CreateObject("excel.application")
xlApp.Visible = True

If Not xlApp Is Nothing Then
xlApp.Workbooks.Open FileName:="C:\test2 - del.xls"
End If

End Sub
'--------------------------------------------

This part works ok in opening Test2 - del.xls in a new
instance of excel.

In this new workbook i cannot open another workbook.

'--------------------------------------------
Private Sub Workbook_Open()
Dim wb As Workbook

Workbooks.Open FileName:="C:\George J.xls"
End Sub
'--------------------------------------------

My original code is more complicated than this but if
anyone can tell me how to get this working i will be
extremely grateful. I am using excel97

thanks
George
 
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
Prevent multiple workbooks in same Excel instance Leon[_2_] Excel Discussion (Misc queries) 8 September 24th 09 08:30 PM
How to open excel workbooks in SAME instance of Excel [email protected] Excel Discussion (Misc queries) 2 September 14th 07 12:12 AM
open excel in a separate instance Eric Excel Discussion (Misc queries) 0 March 9th 07 08:01 PM
How do I set up Excel to open a new instance/application window w. DK9144 Excel Discussion (Misc queries) 1 February 21st 05 04:34 PM
Excel 2003 Workbooks.Open with CorruptLoad=xlRepairFile fails on Excel 5.0/95 file due to Chart, with Error 1004 Method 'Open' of object 'Workbooks' failed Frank Jones Excel Programming 2 June 15th 04 03:21 AM


All times are GMT +1. The time now is 11:17 AM.

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

About Us

"It's about Microsoft Excel"