ajoshi76
Member
The below code is executed after the shape (Gantt chart bar is created) to update the text (Task description).... The output is that from the left margin of the bar the task description is populated... But i would like to have the task description tagged after the bar is ended. I am attaching the output of the current code - any help appreciated.
>>> use code - tags <<<
>>> use code - tags <<<
Code:
If (startDate <= Cells(CurrentRow, 10).Value And EndDate >= Cells(CurrentRow, 10).Value) Or Cells(CurrentRow, 8).Value = "Bar" Or Cells(CurrentRow, 8).Value = "Pointed Bar" Then
With shapePP
.Fill.ForeColor.RGB = RGB(X, Y, Z)
'for bars descriptions are within the bar shape
'if there is no code number or name of milestone "--" sign is skipped
If Cells(CurrentRow, 8).Value = "Bar" Or Cells(CurrentRow, 8).Value = "Pointed Bar" Then
If (Cells(CurrentRow, 5).Value = "" Or Cells(CurrentRow, 6).Value = "") Then
.TextFrame.TextRange.Text = Cells(CurrentRow, 5).Value & Cells(CurrentRow, 6).Value
End If
If (Cells(CurrentRow, 5).Value <> "" And Cells(CurrentRow, 6).Value <> "") Then
.TextFrame.TextRange.Text = Cells(CurrentRow, 5).Value & " - " & Cells(CurrentRow, 6).Value
End If
End If
.Line.ForeColor.RGB = RGB(115, 115, 115)
.TextFrame.TextRange.Font.Name = FontName
.TextFrame.TextRange.Font.Color.RGB = RGB(10, 10, 10)
.TextFrame.TextRange.Font.Size = FontSize - 1
If Cells(CurrentRow, 12).Value = "yes" Then
.TextEffect.FontBold = msoTrue
End If
.Line.Weight = 0.1
.TextEffect.Alignment = msoTextEffectAlignmentLeft
.TextFrame.WordWrap = msoFalse
End With
Attachments
Last edited by a moderator: