Hi,

I have month and year in the worksheet where I allowed user to select Month and Year and I wanted to retrieve last day of the Month+Year selected.
see below codes
Dim Month As String
Dim Year As String
Dim EndDate As Date

Month = Range("B1").Value 'July
Year = Range("D1").Value '2014

EndDate = DateValue((Month + 1) & "/1/" & Year) - 1

Hitting runtime error '13' : Type mismatch. What am I doing wrong? Please help.