Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Open a file in another Workbook
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
excel 2003 saved file will not open without a blank workbook open | Excel Discussion (Misc queries) | |||
One workbook file will not open in Excel | Excel Worksheet Functions | |||
in excel when I open my workbook the file name is followed | Excel Discussion (Misc queries) | |||
second file/Workbook open | Excel Programming | |||
VBA for XL95, Workbook.open non XL-file | Excel Programming |