Hello,
i added the SmartArt Chart Type to my nice tool for ORG Chart Building (NameandTitleOrganizationalChart).
As far as i came i could add the text for all child nodes & other parent nodes, but the Code lines seem to be wrong at the top node of the Chart.
How do i have to adopt the lines to get it work for the top node and my second Question is, how do i have adopt the Code, that i can color the text Frame or Change the border style, width and Change transparence and color of the textframe.
Please see my working example.
Code lines:
'Stefan: Neue Funktion f?r Titelchart! 01.03.21
With QNode.Shapes(2).TextFrame2.TextRange
.Text = Range("P" & r).Value
.Font.Fill.ForeColor.RGB = Range("P" & r).Font.Color
.Font.Size = FPAT
.Font.Italic = Range("P" & r).Font.Italic
If Range("P" & r).Font.Underline = xlUnderlineStyleSingle Then
.Font.UnderlineColor = Range("P" & r).Font.Color 'hier wird die Schriftfarbe ?bernommen - color of font
.Font.UnderlineStyle = msoUnderlineSingleLine 'hier kommt unterstrichen? - underlined?
End If
.Font.Strikethrough = Range("P" & r).Font.Strikethrough 'hier kommt durchgestrichen? - strikethrough?
.Font.Bold = Range("P" & r).Font.Bold
End With
NameandTitleOrganizationalChart Question
-
- 4StarLounger
- Posts: 415
- Joined: 29 Mar 2010, 11:50
- Location: Vienna, Austria
NameandTitleOrganizationalChart Question
You do not have the required permissions to view the files attached to this post.
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: NameandTitleOrganizationalChart Question
Below the lines
insert
This is a literal copy of the code for the other nodes, I only added r = 2 at the beginning.
Code: Select all
QNode.Shapes(1).Fill.ForeColor.RGB = Range("C2").Interior.Color
On Error Resume Next
QNode.Shapes(1).Line.DashStyle = Range("D2").Value
QNode.Shapes(1).Line.Weight = Range("E2").Value
QNode.Shapes(1).Line.ForeColor.RGB = Range("F2").Interior.Color
On Error GoTo 0
Code = Range("H2").Value
Code: Select all
r = 2
With QNode.Shapes(2).TextFrame2.TextRange
.Text = Range("P" & r).Value
.Font.Fill.ForeColor.RGB = Range("P" & r).Font.Color
.Font.Size = FPAT
.Font.Italic = Range("P" & r).Font.Italic
If Range("P" & r).Font.Underline = xlUnderlineStyleSingle Then
.Font.UnderlineColor = Range("P" & r).Font.Color 'hier wird die Schriftfarbe übernommen - color of font
.Font.UnderlineStyle = msoUnderlineSingleLine 'hier kommt unterstrichen? - underlined?
End If
.Font.Strikethrough = Range("P" & r).Font.Strikethrough 'hier kommt durchgestrichen? - strikethrough?
.Font.Bold = Range("P" & r).Font.Bold
End With
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 78586
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: NameandTitleOrganizationalChart Question
You already have code for the border of QNode.Shapes(1). If you want to do the same for QNode.Shapes(2), what is the problem?
Best wishes,
Hans
Hans
-
- 4StarLounger
- Posts: 415
- Joined: 29 Mar 2010, 11:50
- Location: Vienna, Austria
Re: NameandTitleOrganizationalChart Question
Oh, wow, Thank you again, Hans,
i thougt, i should take the TextBox for changing the Colors, but it had to be the shapes(2)….
Puh, awesome.
Stef
now, there is only the color of the connectors left how to set them….
i thougt, i should take the TextBox for changing the Colors, but it had to be the shapes(2)….
Puh, awesome.
Stef
now, there is only the color of the connectors left how to set them….