I am creating a Gantt Chart with certain events (represented by icons). Each row in my table represents one event, and the type is represented by the naming convention (Icon1,Icon2,Icon3...). These names found within the row will match the Name Manager names of the icons already created in the Legend.
I am having the following issues:
1. ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(p, 5).Value).Select (LINE 6)
- "The item with the specific name wasn't found"
- It was working at some point, but somehow stopped and I'm not sure what changed.
2. .ForeColor.RGB = RGB(Cells(i, 6).Value, Cells(i, 7).Value, Cells(i, 8).Value)
- This doesnt error me out, but it comes back as Black every time regardless of which numbers are in the cells.
I am having the following issues:
1. ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(p, 5).Value).Select (LINE 6)
- "The item with the specific name wasn't found"
- It was working at some point, but somehow stopped and I'm not sure what changed.
2. .ForeColor.RGB = RGB(Cells(i, 6).Value, Cells(i, 7).Value, Cells(i, 8).Value)
- This doesnt error me out, but it comes back as Black every time regardless of which numbers are in the cells.
Code:
Sub Move()
Dim p As Integer
p = 3
Do While Worksheets("PoAP (Data)").Cells(p, 5).Value <> ""
Sheets("Sheet3").Select
ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(p, 5).Value).Select
Selection.Copy
ActiveSheet.Paste
Selection.ShapeRange.Name = Worksheets("PoAP (Data)").Cells(p, 4)
p = p + 1
Loop
Dim i As Integer
i = 3
Do While Worksheets("PoAP (Data)").Cells(i, 4).Value <> ""
ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(i, 4)).width = Worksheets("PoAP (Data)").Cells(i, 12).Value
ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(i, 4)).height = Worksheets("PoAP (Data)").Cells(i, 11).Value
With ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(i, 4)).Fill
.Visible = msoTrue
.ForeColor.RGB = RGB(Cells(i, 6).Value, Cells(i, 7).Value, Cells(i, 8).Value)
.Transparency = 0
.Solid
End With
ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(i, 4)).Left = Worksheets("PoAP (Data)").Cells(i, 9)
ActiveSheet.Shapes(Worksheets("PoAP (Data)").Cells(i, 4)).Top = Worksheets("PoAP (Data)").Cells(i, 10)
i = i + 1
Loop
End Sub