Insert Table into Shape

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top