PDA

View Full Version : Getting Error Message in Excel 2007



sj72053
07-09-2008, 11:30 PM
Hi All,
When i used the following two codes in Microsoft Office Excel 2003 with Windows XP as OS it is working fine, but when i tried to run the same code in Microsoft Office Excel 2007 with Windows Vista as OS , i am unable to Run the Code , getting the following Error Message as :-

Error Message as : Compile error: Can't find project or library

Code #1 :-
~~~~~

Trim(Worksheets("Sheet1").Cells(1, 1).Value)


Code #2 :-
~~~~~


Dim LastRow As Object
Set LastRow = Sheets("Sheet1").Range("a65536").End(xlUp)


____________________________________________
Can some one tell me how can we resolve this problem ....

Bob Phillips
07-10-2008, 11:47 AM
The first thing to check is in the VBIDE, look at Tools>References, and see if there any items that are MISSING. If so, uncheck them.

Simon Lloyd
07-10-2008, 12:39 PM
Shouldn't LastRow be declared as Range (or Long if finding the row)?