new to access question about refrences

R

Raymond

Hi Chris,

What you need to do is as below coding

-- Define the object

Dim oExl As Object
Dim oSheet As Object

-- Open thte Excel.Application in the form
Set oExl = CreateObject("Excel.Application")
oExl.Workbooks.Open (FileName)
Set oSheet = oExl.Sheets(1)

-- Then you can read the spreadsheet
Myfield in Access = oSheet.Cells(1, 2)
etc

-- Remember to close the EXCEL after you.
oExl.Quit
Set oExl = Nothing

-- It is very simple and you should able to find some examples in the
Internet

Wish I can help.
Raymond
 
C

cjbarron5

Top