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: 44
Default InputBox Date Value

Hi all,
I have created a inputbox where user has to put the date, the default value
is Cdate i.e today's date in DD/MM/YYYY format.
The variable report date is set according to the input box. Upto here, its
working fine. I am getting the desired report.
But if the user only enter the month & year in the input box, the system
itself define the variable to first date of the month, which i dont want. in
this case the variable should set only for mm/yyyy & not the dd/mm/yyyy
Can it be possible as I have created a report based on this. such as if user
wants the output for the particular date, user must enter the desired date
and if user want the output for the particular month then inputbox value must
return the datevalue for month & year.
Sub Tester()
Dim myDate As Date

myDate = Application.InputBox(Prompt:="Enter the Report Date", _
Title:="Date Parameter !", Default:=Format(CLng(Date),
"DD/MM/YYYY")) Here (in the inputbox) if I put the value 06/2008 then
dateValue should return for the month of Jun 2008 but the value is returning
01/Jun/2008 And if I put the datevalue as 06/09/2008 then datevalue should
return 06/sept/2008.

MsgBox (myDate)


End Sub
I am using this for sumproduct function.
Application.Evaluate("=sumproduct(('Issue'!D2:D655 00= """ _
& myCell.Value & """ )*('Issue'!B2:B65500 =" & RptDt &
"),('Issue'!G2:G65500))")
Plz. help.
--
Thanks,
Vikram P. Dhemare
 
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
inputbox uk date tina Excel Programming 4 April 4th 06 10:44 AM
InputBox a date Otto Moehrbach Excel Programming 6 April 12th 05 02:58 PM
Inputbox to enter date Tom Ogilvy Excel Programming 0 July 27th 04 05:44 PM
Inputbox as Date andibevan Excel Programming 3 July 9th 04 02:15 PM
Date from InputBox Michael Excel Programming 3 May 26th 04 01:11 PM


All times are GMT +1. The time now is 08:29 AM.

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"