I made a function in Excel. The function does some error checking within the Excel file.
To be easy for me, I want my code in MS Access to simply call the function in Excel.
I check this MS Support site: http://support.microsoft.com/kb/198571
I tried calling my function and it didn't work.
Here's my MS Access code:
Expand|Select|Wrap|Line Numbers
- Dim oXL As Excel.Application ' Excel Application
- Set oXL = CreateObject("Excel.application")
- oXL.Workbooks.Open (sXclFilePath)
- oXL.Application.ErrorCheck
- Set oXL = Nothing
Expand|Select|Wrap|Line Numbers
- Public Sub ErrorCheck()
- MsgBox "Inside Excel function."
- 'Supposedly some error checking...
- End Sub
"Object doesn't support this property or method"
What's wrong with my code above?
How to call Excel customed function within MS Access?
-= keirnus =-