Thanks. I see what you mean re the format date.
The next issue is complicated.
What should happen:
1) In Sheet 2, when you click on "Next week", "prev week", "This week" shapes, it causes the sub "ScheduleRefresh" to run.
2) "ScheduleRefresh" causes the shapes in Sheet 2 that are in the calendar area (column >3 and row >4) to delete.
An autofilter of the master list of tasks in Sheet 3 A:N. The criteria of the autofilter is based on Sheet3 S2:V3 (starting date of week, end date of week, staff member and task is not pending).
3) The filtered list is pasted to Sheet3 AA2:AN2.
4) In Sheet 2 in the A/B columns there is a square shape named "Sample".
5) The formula below is meant to duplicate the shape and rename it to the task ID numbers in Sheet 3 column AA.
I am getting an error related to the code below.
If I add On Error Resume Next, All the shapes in Sheet 2 are deleted (even the arrows).
Sheet2.Shapes("Sample").Duplicate.Name = TaskID
With Sheet2.Shapes(TaskID)
.Left = Sheet2.Cells(ScRow, ScCol).Left 'ScRow = first row, ScCol = first Column of schedule
.Top = Sheet2.Cells(ScRow, ScCol).Top
.Width = Sheet2.Cells(ScRow, ScCol).Width
.Height = Range(Sheet2.Cells(ScRow, ScCol), Sheet2.Cells(ScRow + DurRows - 1, ScCol)).Height 'https://www.youtube.com/watch?v=8-IEk-pmfco 1:09
.TextFrame2.TextRange.Text = TaskText
If TaskColor <> "" Then .Fill.ForeColor.RGB = TaskColor
End With
This is the section of the training where he is adding this code if I have not explained it well: https://www.youtube.com/watch?v=h79SNTpxKzc. Time: 1hr into the video.
Bookmarks