siddhuprince86
New Member
Code:
Sub show_Date()
Dim first_Date As Date
Dim last_Date As Date
first_Date = VBA.CDate("1-" & Me.Cmbbmonth.Value & "-" & Me.Cmbyear.Value)
last_Date = VBA.DateSerial(YEAR(first_Date), Month(first_Date) + 1, 1) - 1
Dim i As Integer
Dim btn As MSForms.CommandButton
End Sub
while running this code i am experiencing compile error:
mainly at last_date, syntax for VBA.Dateserial(Year as integer,Month as integer,day as integer)
how to solve this issue