Access VBA stops understanding "Dim excelApp As excel.Application"

My Access project stopped working, Suddenly it does not recognise a statement like
"Dim excelApp As excel.Application" . It worked an hour earlier. Even if I restart my computer it still gives error message like below. I also include picture of my references.

I copied the same form to another project and it works. What could have gone wrong?

I will try to solve the problem by copying everything over to a new project.

Can you say what went wrong? How can I fix it? How can I prevent it from occurring?

error messagemy references
Fritz PaulAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rgonzo1971Connect With a Mentor Commented:
Hi,

Is the reference to Excel that is missing

Look for Microsoft Excel 14.0 Object Library

EDIT
if you cannot find it Click Browse and look for the actual Excel.exe (Changing the file type)

Regards
0
 
Fritz PaulAuthor Commented:
Well spotted! I love it!
0
All Courses

From novice to tech pro — start learning today.