LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default date returning time in vba intermediate window

The following is an example of some code that I am using in a process
to make charts. While troubleshooting a date calculation error, I
found out that "lastdate" returns a value of 12:00:00 AM in the
intermediate window.
Lastdate is dim'd as public lastdate as date.

ans = MsgBox("Do you want to lock in a review period end date?",
vbYesNo)
If ans = vbYes Then 'lock in a date for the end of review period for
subsequent runs
LastDate = InputBox("What date (MM/DD/YYYY) will mark the end of
the review periods?", , "10/1/2006")
Else: LastDate = CDate(Now()) 'not sure what CDATE does
End If

What am I doing wrong that would cause this to indicate a time instead
of a date as I entered?

TIA

 
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
Hide Intermediate Levels in Date Dimension Domenick Excel Discussion (Misc queries) 0 December 16th 09 10:09 PM
Complex Time Window / date based calculation stef Excel Worksheet Functions 0 September 10th 07 08:06 PM
formulas using date/time formats returning #value Liesel Excel Discussion (Misc queries) 7 June 20th 06 06:13 AM
Calculating days & time left from start date/time to end date/time marie Excel Worksheet Functions 7 December 7th 05 02:36 PM
clear intermediate window automatically Steven Deng Excel Programming 13 November 1st 04 08:34 AM


All times are GMT +1. The time now is 09:41 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"