Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
cdb cdb is offline
external usenet poster
 
Posts: 62
Default Date error message (VBA)

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??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Date error message (VBA)

Try using Today() insyead of date...


On Aug 1, 11:50 am, cdb 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??



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Date error message (VBA)

Won't work - Today() isn't defined in VBA.

In article .com,
KLZA wrote:

Try using Today() insyead of date...

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 149
Default Date error message (VBA)

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: ToolsReferences. 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.

DebugCompile MyProject

HTH,


"cdb" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message needed if incorrect Date Of Birth (DOB) entered Craig Excel Worksheet Functions 5 January 27th 10 08:24 PM
Find Date error message FIRSTROUNDKO via OfficeKB.com Excel Programming 2 September 28th 06 12:28 PM
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
Input Date Error Message Dominique Feteau[_2_] Excel Programming 2 December 4th 04 08:00 AM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"