Results 1 to 7 of 7

VBA problem with define

This is a discussion on VBA problem with define within the Excel Questions forums, part of the Question Forums category; Hii use this code in my Excel If date > range("mydate") It works on excel 2013 But in Excel 2007 ...

  1. #1
    Board Regular
    Join Date
    Aug 2009
    Posts
    716

    Default VBA problem with define

    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

  2. #2
    Board Regular
    Join Date
    Jul 2002
    Location
    Derbyshire, UK
    Posts
    1,589

    Default Re: VBA problem with define

    In the VB Editor check Tools -> References and see if any are marked "Missing" If they are uncheck them
    Hope that helps.

    Free Excel sample DataBase Form here

    royUk's web site

    "making Excel work for you"

  3. #3
    Board Regular
    Join Date
    Aug 2009
    Posts
    716

    Default Re: VBA problem with define

    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

  4. #4
    Board Regular
    Join Date
    Jul 2002
    Location
    Derbyshire, UK
    Posts
    1,589

    Default Re: VBA problem with define

    I doubt if you can correct it by code if the Project is protected
    Hope that helps.

    Free Excel sample DataBase Form here

    royUk's web site

    "making Excel work for you"

  5. #5
    MrExcel MVP
    Moderator
    RoryA's Avatar
    Join Date
    May 2008
    Location
    UK
    Posts
    29,381

    Default Re: VBA problem with define

    You need to late bind instead of using references.

  6. #6
    Board Regular
    Join Date
    Aug 2009
    Posts
    716

    Default Re: VBA problem with define

    Quote Originally Posted by RoryA View Post
    You need to late bind instead of using references.
    Could you explain what you mean by late bind

  7. #7
    Board Regular
    Join Date
    Jul 2002
    Location
    Derbyshire, UK
    Posts
    1,589

    Default Re: VBA problem with define

    Here's something that may help

    Early Binding vs Late Binding
    Hope that helps.

    Free Excel sample DataBase Form here

    royUk's web site

    "making Excel work for you"

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com