Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Excel file in Access 2000 application

Status
Not open for further replies.

chuongcom

IS-IT--Management
May 15, 2002
6
VN
In an Access 2000 application, I'm using the following code to open Excel file Example.XLS:

' Start Excel
Dim xlApp As Object ' Excel.Application
Set xlApp = CreateObject("Excel.Application")

' Add a new workbook
Dim xlBook As Object ' Excel.Workbook
Set xlBook = xlApp.Workbooks.Open("Example.XLS")

But, when running this application in Access 2002 (Office XP), I get an error message:

"Unable to get the Open property of the workbooks class"

I need this application can run in Access 2000 and Access 2002.

Help me, please !
Thank you

CHUONGCOM
 
Do you have the proper reference libraries loaded?...

In the VBA editor it's Tools>Refeneces,...from there it's a crap shoot to pick the right one....I can't find any key to picking the correct one except to try to get clues from the names (some are obvious).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top