Just starting with a new module to work with an Excel worksheet. The following code fails since the "Match" function IS NOT native to Access VBA. Does anyone know what the statement should be to replace the erroneous "Match" attempt seen in the code?
Code:
Option Compare Database
Option Explicit
Public Sub UpdateExcelPC()
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
' Open the PerCapita test file and find the string "Luckey" in
' column "L".
'*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Dim xlsApp As Object
Set xlsApp = CreateObject("Excel.Application")
xlsApp.Visible = True
xlsApp.workbooks.Open "c:\eRep\PerCapTestFile.xlsx", True, False
'MsgBox MATCH("Luckey", "L:L", 0) 'Find Luckey in column "L"
xlsApp.workbooks.Close
xlsApp.Quit
Set xlsApp = Nothing
End Sub