Here are a couple of ways and by no means are these the only ways...

Option Explicit
Private Sub Form_Load()
Dim M As Integer, D As Integer, Y As Integer
Dim S As String, LastDay As Date
M = Month(Now)
D = Day(Now)
Y = Year(Now)
If IsDate(M & "/" & 28 & "/" & Y) = True Then D = 28
If IsDate(M & "/" & 29 & "/" & Y) = True Then D = 29
If IsDate(M & "/" & 30 & "/" & Y) = True Then D = 30
If IsDate(M & "/" & 41 & "/" & Y) = True Then D = 31
LastDay = M & "/" & D & "/" & Y
S = "The last day of this month is " & Format(LastDay, "dddd") & " "
MsgBox S & LastDay
'or
LastDay = M & "/" & 1 & "/" & Y
LastDay = DateAdd("m", 1, LastDay)
LastDay = DateAdd("d", -1, LastDay)
S = "The last day of this month is " & Format(LastDay, "dddd") & " "
MsgBox S & LastDay
End Sub

Here are a couple of ways and by no means are these the only ways...

Option Explicit
Private Sub Form_Load()
Dim M As Integer, D As Integer, Y As Integer
Dim S As String, LastDay As Date
M = Month(Now)
D = Day(Now)
Y = Year(Now)
If IsDate(M & "/" & 28 & "/" & Y) = True Then D = 28
If IsDate(M & "/" & 29 & "/" & Y) = True Then D = 29
If IsDate(M & "/" & 30 & "/" & Y) = True Then D = 30
If IsDate(M & "/" & 41 & "/" & Y) = True Then D = 31
LastDay = M & "/" & D & "/" & Y
S = "The last day of this month is " & Format(LastDay, "dddd") & " "
MsgBox S & LastDay
'or
LastDay = M & "/" & 1 & "/" & Y
LastDay = DateAdd("m", 1, LastDay)
LastDay = DateAdd("d", -1, LastDay)
S = "The last day of this month is " & Format(LastDay, "dddd") & " "
MsgBox S & LastDay
End Sub

Good Luck

Thank you for giving time with this problem. Anyway ive got i very simpler solution with this problem.the code below. This works very well.

Private Sub Form_Load()
Dim lastdayofmonth
lastdayformonth = CDate(DateAdd("d", -1, DateAdd("m", 1, Month(Now()) & "/1/" & Year(Now()))))
MsgBox lastdayformonth
End Sub

Hi everyone!, I had this confusion about the the Bucket Sort Algorithm.
I just wanna know why mostly bucket sort use the range of element in between 0 and 1 ...