I am writing a procedure to read through a series of Excel 97 spreadsheets and convert the contents into an Access 2000 database.
However, several of the cells in the sheets have errors in their formulas, e.g.
=(#REF!-C7)/0.0125
What I want to do is report the error and save the details into an Access table. The problem is that however I try to reference the cell I keep getting Error 2023 come up on the first line of the following code :
If Mid(objXLSheet.Cells(intRow, intCol).Formula, 3, 4) = “#REF” Then
intPos = 1
Else
intPos = InStr(objXLSheet.Cells(intRow, intCol), strQuote)
End If
Any ideas on how I can stop this happening ?
Thanks for your help
Nick