View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Niek Otten Niek Otten is offline
external usenet poster
 
Posts: 3,440
Default VBA - number of monthdays ...

Hi Mirja,

Just leave out the "+1"

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel

"Mirja" wrote in message
...
Hello!

I would like to change the follwoing command:

dbentry = Day(DateSerial(Year(Date), Month(Date) + 1, 0))
* 24

Excel should take the number of days of the month "two
days ago" (e.g. today is March 2nd, Excel should take
number of days in February). My problem is that data from
the previous month needs to be calculated on 1st and 2nd
of the current month ...

Can anybody help?

Thank you,
Mirja