Hello
i've a Column in worksheet which reads as mmm-yy displays as 1st day of month in userform textbox . Want it to be as last date of month
eg it is Dec-20 in column which reads as 01-12-2020 in textbox i would like to read as 31-12-2020 or 31-Dec-2020
some how below code did not execute properly
NimishK
i've a Column in worksheet which reads as mmm-yy displays as 1st day of month in userform textbox . Want it to be as last date of month
eg it is Dec-20 in column which reads as 01-12-2020 in textbox i would like to read as 31-12-2020 or 31-Dec-2020
some how below code did not execute properly
VBA Code:
Public Function GetLastDayOfMonth(ByVal myDate As Date) As Date
GetLastDayOfMonth = DateSerial(Year(myDate), Month(myDate) + 1, 0)
End Function
Private Sub CmdBtn1date_Click()
With wrkSht
txtdDate.Text = GetLastDayOfMonth(.Range("L" & rw).Value)
End with
End Sub