PC Review


Reply
Thread Tools Rate Thread

Date error message (VBA)

 
 
=?Utf-8?B?Y2Ri?=
Guest
Posts: n/a
 
      1st Aug 2007
I created a spreadsheet using Office 2003 on an XP machine that on open looks
at todays date and checks it against a shelflife date using this code:

TodaysDate = Date

When a colleague using Excel 2000 on a Windows NT (or 2000, not 100% sure at
the moment) tries to open up the spreadsheet they get an error saying:

Compile Error:
Can't find project or library

and it highlights the word Date (the one after the equals sign). I thought
this was a standard VBA keyword, so I don't understand why this is causing a
problem. Can anyone shed some light for me??
 
Reply With Quote
 
 
 
 
KLZA
Guest
Posts: n/a
 
      1st Aug 2007
Try using Today() insyead of date...


On Aug 1, 11:50 am, cdb <c...@discussions.microsoft.com> wrote:
> I created a spreadsheet using Office 2003 on an XP machine that on open looks
> at todays date and checks it against a shelflife date using this code:
>
> TodaysDate = Date
>
> When a colleague using Excel 2000 on a Windows NT (or 2000, not 100% sure at
> the moment) tries to open up the spreadsheet they get an error saying:
>
> Compile Error:
> Can't find project or library
>
> and it highlights the word Date (the one after the equals sign). I thought
> this was a standard VBA keyword, so I don't understand why this is causing a
> problem. Can anyone shed some light for me??



 
Reply With Quote
 
JE McGimpsey
Guest
Posts: n/a
 
      1st Aug 2007
Won't work - Today() isn't defined in VBA.

In article <(E-Mail Removed)>,
KLZA <(E-Mail Removed)> wrote:

> Try using Today() insyead of date...
>

 
Reply With Quote
 
George Nicholson
Guest
Posts: n/a
 
      1st Aug 2007
You are missing a object library reference. The fact that Date() is
highlighted when the error message is generated does NOT mean its the VBA
library (it never is...). When this problem occurs what gets highlighted is
often random, misleading and meaningless.

In the VB editor: Tools>References. Something in the list will probably
appear as "MISSING" (and it won't be the VBA object library). If the missing
reference is not needed by existing code, uncheck it (if needed, it *may*
not let you uncheck it). If it is needed, find it, or the "current version"
equivalent, and try again.

Debug>Compile MyProject

HTH,


"cdb" <(E-Mail Removed)> wrote in message
news:A164B778-C86B-4199-BEF0-(E-Mail Removed)...
>I created a spreadsheet using Office 2003 on an XP machine that on open
>looks
> at todays date and checks it against a shelflife date using this code:
>
> TodaysDate = Date
>
> When a colleague using Excel 2000 on a Windows NT (or 2000, not 100% sure
> at
> the moment) tries to open up the spreadsheet they get an error saying:
>
> Compile Error:
> Can't find project or library
>
> and it highlights the word Date (the one after the equals sign). I thought
> this was a standard VBA keyword, so I don't understand why this is causing
> a
> problem. Can anyone shed some light for me??



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Low Guide Date Error Message rlbonnette Windows Vista General Discussion 1 28th Dec 2009 02:04 PM
Out of date error message. Marcus Microsoft Outlook Calendar 3 9th Dec 2008 05:23 PM
displaying error message if end date is prior to begin date stef Microsoft Excel Discussion 5 27th Sep 2007 11:31 AM
Date validation error message =?Utf-8?B?SmFtZXMgUGFnZQ==?= Microsoft Access 0 7th Feb 2006 06:01 PM
Input Date Error Message Dominique Feteau Microsoft Excel Programming 2 4th Dec 2004 08:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:18 AM.