• 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.

Making a dynamic calendar

negarshaban

New Member
Hi everyone...
I have a calendar and I need to assign tasks on it, but I want them to be repeated from the start date(1/12/2022) to the end date(12/12/2022) of the task.

secondly, I may assign multiple tasks on one cell, I want it to be possible queuing new tasks by char(10).

TASKSSTART DATEFINISH DATE
TASK 11/12/202212/12/2022
Code:
 Private Sub Worksheet_Activate()
 On Error Resume Next
 Dim sh As Worksheet, wInt As Variant
 Dim row1 As Integer, cl1 As Integer
 Dim c

 For row1 = 5 To 15 Step 2
 For cl1 = 2 To 8
 wInt = Cells(row1, cl1).Value
 
 For Each c In Sheets("Gantt").Range("C2:C" & Range("C" & Rows.Count).End(xlUp).row)

 If c.Value = Cells(row1, cl1).Value Then
 
 
 Cells(row1, cl1).Offset(1, 0).Value = c.Offset(0, -1)
 
 
 End If
 
 Next

 Next
 Next
End Sub
 

Attachments

  • calendar test.xlsm
    38.5 KB · Views: 13
Back
Top