Thread: Date Variable
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ranjith Kurian[_2_] Ranjith Kurian[_2_] is offline
external usenet poster
 
Posts: 48
Default Date Variable

Hi

I have one problem with the below code, it showing me the march 9th date,
how will i change it to 1st of every month, so that next month when i run
this it should show me 1st of April.

curmt = Format(Date, "mmm-yy")
curmth = CDbl(CDate(curmt))
MsgBox curmth

Answer is 39881, the required answer is 39873