Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
inputbox uk date | Excel Programming | |||
InputBox a date | Excel Programming | |||
Inputbox to enter date | Excel Programming | |||
Inputbox as Date | Excel Programming | |||
Date from InputBox | Excel Programming |