Banner

Saturday, February 17, 2018

Multiple Year Calendar In userform Excel VBA

1 comment:

  1. hi, i have a question. already followed your vid. however after i run the year box and monthbox, i had a problem.
    under monthbox, it does not show the months from jan to dec. Month of January appears all through out. What do you think?
    here's the code i copied:

    Private Sub UserForm_Initialize()
    For i = 1 To 20
    a = Format(Date, "YYYY") - 10 + i
    Me.Yearbox.AddItem a
    Next i
    Me.Yearbox.Value = Format(Date, "YYYY")

    For x = 1 To 12
    c = 1 & "/" & x & "/" & 2018
    Me.Monthbox.AddItem Format(c, "MMMM")
    Next x
    Me.Monthbox = Format(Date, "MMMM")

    End Sub

    Thanks

    ReplyDelete

Please do not enter any spam message in comment box