Good day
Please help
I have this vba code when u click on the macro it asks for the day of the month (todays date) in the inputbox and then shows as a message
i want when the macro is run to the 1st day of the month and then it must start in cell A1 on the excel sheet and populate downwards.
Sub Calender()
Dim dStart As Date, dDay As Date
Dim i As Integer, sCal As String
Dim sRange As String
dStart = InputBox("Start", , Date)
For i = 0 To 30
dDay = dStart + i
If Weekday(dDay) <> 1 And Weekday(dDay) <> 7 Then
sCal = sCal & vbCr & Format(dDay, "ddd" & vbTab & "dd.mm.yyyy")
Else
sCal = sCal & vbCr
End If
Next i
MsgBox sCal
End Sub
Bookmarks