Hello,
please tell me how to generate a full month calendar into this table using VBA For loops. Please I am stucked here for 3 daysfff.png
Hello,
please tell me how to generate a full month calendar into this table using VBA For loops. Please I am stucked here for 3 daysfff.png
Assuming your top left cell is A1:
![]()
Sub taralian() x = InputBox("What month? i.e. January = 1") Z = Format(DateSerial(2016, x, 1), "dddd") y = 1 For i = Cells.Find(Z).Row To 7 Cells(i, 1).Value = y y = y + 1 Next For j = 2 To 6 For i = 1 To 7 Cells(i, j).Value = y y = y + 1 If y > CInt(Format(DateSerial(2016, x + 1, 0), "dd")) Then Exit Sub Next Next End Sub
I'm interested in starting a career working with VBA, if anyone knows of any opportunities!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks