View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Open a file in another Workbook



Try

Set XLBook = XLApp.Workbooks.Open ("C:\path\file.xls")

If all you need to do with your Access data is to query and/or change
records in a database, you can simply access the database directly via
ADO. You don't need to go through the Access application at all.

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]



On Fri, 12 Mar 2010 14:05:01 -0800, Philosophaie
wrote:

Dim XLApp As Excel.Application
Dim XLBook As Excel.Workbook
Set XLApp = CreateObject("Excel.Application")

'how do you word the opening of another preexisting file different than
'the current activesheet using Early binding? How do you link the two?
I tried:
'XLApp.Open ("c:\path\file.xls")
'XLApp.XLBook.Open ("c:\path\file.xls") they did not work


I also want to do the same for Access:

Dim AccApp As Access.Application

or something similar plus be able to manipulate the data from Excel to
Access would be nice.