VBA problem with define

LearnMeExcel

Well-known Member
Joined
Aug 11, 2009
Messages
728
Hii use this code in my Excel
If date > range("mydate")

It works on excel 2013
But in Excel 2007
I get this msg
Can't find project or library

Same problem with all code like
Right or mid
If val(right(myctl.name,1)

I get same error on Excel 2007
But it I working on Excel 2013




May be my problem with reference or something like that
 

Some videos you may like

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

royUK

Well-known Member
Joined
Jul 24, 2002
Messages
1,605
In the VB Editor check Tools -> References and see if any are marked "Missing" If they are uncheck them
 

LearnMeExcel

Well-known Member
Joined
Aug 11, 2009
Messages
728
Yes you are right this is the problem
But ican't do it manual
Cuz my file sent by email for all my colleague in different area
And my file protect
And the missing check with outlook code I can't remove this code
Can we have any code to solve this problem
 

royUK

Well-known Member
Joined
Jul 24, 2002
Messages
1,605
I doubt if you can correct it by code if the Project is protected
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,802
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
You need to late bind instead of using references.
 

Watch MrExcel Video

Forum statistics

Threads
1,095,800
Messages
5,446,554
Members
405,406
Latest member
tuxy

This Week's Hot Topics

Top