Running an Excel module within Access?

  • Thread starter Thread starter Id10 Terror
  • Start date Start date
I

Id10 Terror

Hi:

I have both MS Excel 2003 and Access 2003. I am getting an Excel module
that will connect to the internet and download some information. I will
only use Excel for this single feature. I always work within Access and now
I need to know how to run that Excel module within Access so that I can
import/link and append the records.

Can any show me how to run an Excel module within Access?


Thanks
 
Sure set a reference to Microsoft Excel from Tools ... References in any
code window. In a standard module put some code that uses the Excel
function, like this for the Excel 360 function:

Public Function XL360(Date1, Date2) As Double
Dim objXL As New Excel.Application
XL360 = objXL.WorksheetFunction.Days360(Date1, Date2)
Exit_Here:
Set objXL = Nothing
Exit Sub
End Function

Then the Immediate Window will yield:

? XL360("1/1/05", "9/11/05")
250
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top