• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

enable to execute the command

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
 

Attachments

Top