P
Paige
Am trying to use code to insert an Excel table into a shape. Both the table
and shape exist in the same workbook; the table is defined by a range name.
Using the following code I can insert the contents of one cell (P47, for
example), but have been unable to figure out how to insert a table based upon
a range name. Can someone advise on this please?
Dim shp As Shape
Dim sText As String
Set shp = ActiveSheet.Shapes("Rectangle 308")
sText = Worksheets("Tables for Pop-Ups").Range("P47").Text
shp.TextFrame.Characters.Text = sText
and shape exist in the same workbook; the table is defined by a range name.
Using the following code I can insert the contents of one cell (P47, for
example), but have been unable to figure out how to insert a table based upon
a range name. Can someone advise on this please?
Dim shp As Shape
Dim sText As String
Set shp = ActiveSheet.Shapes("Rectangle 308")
sText = Worksheets("Tables for Pop-Ups").Range("P47").Text
shp.TextFrame.Characters.Text = sText