View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dick Kusleika[_4_] Dick Kusleika[_4_] is offline
external usenet poster
 
Posts: 595
Default Year showing 1899 instead of 2009

On Mon, 23 Feb 2009 13:48:35 -0500, "Rick Rothstein"
wrote:

TODAY is a worksheet function, not a VB one. Use either one of these
instead...

? Year(Now)

? Year(Date)


In addition, under VBE - Tools - Options, check Require Variable
Declaration. That way VBA would not try to interpret 'today' as a variable.
And it's just good practice.
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com