Urgent: Object Explicit Error

J

Jonathan Lowe

I am getting an error: "Compile error:can't find project
or library" for variables that are not defined. Object
Explicit has not been stated and the option "Require
Variable Declaration" is not ticked.

Any help on this asap would be greatly appeciated.
Thanks
Jonathan
 
K

Kent Prokopy

This error generally happens when an object library is missing. Go to Tools,
References and check to see if any of the selected libraries are missing. If
so, Remove it and reload it.
 
C

Chip Pearson

Jonathan,

Try the following. First, in VBA go to the Tools menu, choose References,
and see if any references are marked "MISSING". If so, uncheck those
references. Try to compile the code. If this doesn't work, then close
Excel, and go to the Windows Start menu, choose Run and enter the following
in the Run dialog:

Excel.exe /regserver


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com [email protected]
 
Top