Sub abc()
Dim dm As Variant
Dim m, w, d, r As Integer
y = InputBox("put_year")
m = InputBox("put_month")
d = DateSerial(y, m, 1)
w = Weekday(d)
r = 3
Range("3:10").ClearContents
Cells(1, 1) = y & "-year," & m & "-month"
dm = Array(31, 28, 31, 30, 31, 30, 31, 31, 30, ...