# Solved: Dim xlApp As Excel.Application Error



## vinotech (Oct 22, 2011)

Hi,

I am getting this error message when i try to run a VBA Macro. Is it because of some references i am missing out?
I have MS Office 2007 installed in my system.

Dim xlApp As Excel.Application

Can someone helpme with this thing?

See File Attached for your reference

Thank you very much


----------



## Ziggy1 (Jun 18, 2002)

You sure you attached the correct file? It's a word document?


----------



## BPCS (May 26, 2012)

What exactly is the error msg? The vba referance you need to create an excel application object is 'Microsoft Excel 12.0 object library'. from the menu bar goto tools ---> referances and check the stated above.


----------



## Keebellah (Mar 27, 2008)

Vinotech has new post and there he uses docx files in that case either 12 for 2007 or 14 for 2010
That's not clear


----------



## vinotech (Oct 22, 2011)

Thanks you everyone...
I already have this reference. 'Microsoft Excel 12.0 object library' . Still it doesn't work.
It gives me this error message. See screenshot attached.


----------



## Keebellah (Mar 27, 2008)

It is the *MicroSoft Word* library that is missing, Check the error message, the first thumbnail.


----------



## Keebellah (Mar 27, 2008)

Have you checek the Micrsoft Word 12.0 Object Library?


----------



## vinotech (Oct 22, 2011)

Yes i did... thanks a lot hans... it did worked well... i could able to run my macro now...

Thanks again... Much helpful


----------

