Hi all
I have a workbook with 2 different worksheets. In the first worksheet you type in different information. When clicking on the other worksheet the data from the first worksheet is then copied and pasted into shapes in the second worksheet.
I have a challenge of keeping the source formatting when pasting the ranges into my shape. I want some of the ranges to be bold and the other should just stay as they are.
In the below I have highlighted the ranges that I want to be bold and my code:
Private Sub CopySparring(ShtSrc As Worksheet, ShtDst As Worksheet)
Dim shp As Shape
With ShtSrc
ShtDst.Shapes("Sparring").TextFrame.Characters.Text = _
Range("Strength") & Chr(13) _
& .Range("Sparring_Str") & Chr(13) & Chr(13) _
& .Range("Devel") & Chr(13) _
& .Range("Sparring_Dev") & Chr(13) & Chr(13) _
& .Range("Overall_Eva") & Chr(13) _
& .Range("Overall_feedback")
End With
Set shp = ShtDst.Shapes("Sparring")
ChangeFont shp
End Sub
I hope someone can help me.
Thanks
I have a workbook with 2 different worksheets. In the first worksheet you type in different information. When clicking on the other worksheet the data from the first worksheet is then copied and pasted into shapes in the second worksheet.
I have a challenge of keeping the source formatting when pasting the ranges into my shape. I want some of the ranges to be bold and the other should just stay as they are.
In the below I have highlighted the ranges that I want to be bold and my code:
Private Sub CopySparring(ShtSrc As Worksheet, ShtDst As Worksheet)
Dim shp As Shape
With ShtSrc
ShtDst.Shapes("Sparring").TextFrame.Characters.Text = _
Range("Strength") & Chr(13) _
& .Range("Sparring_Str") & Chr(13) & Chr(13) _
& .Range("Devel") & Chr(13) _
& .Range("Sparring_Dev") & Chr(13) & Chr(13) _
& .Range("Overall_Eva") & Chr(13) _
& .Range("Overall_feedback")
End With
Set shp = ShtDst.Shapes("Sparring")
ChangeFont shp
End Sub
I hope someone can help me.
Thanks