"= Rectangle 1" Doesn't work!
"= Rectangle 1" Doesn't work!
(OP)
Hi,
How can I put content of a shape in a cell?
"= Rectangle 1" doesn't work. any Idea?
Thanks
How can I put content of a shape in a cell?
"= Rectangle 1" doesn't work. any Idea?
Thanks





RE: "= Rectangle 1" Doesn't work!
RE: "= Rectangle 1" Doesn't work!
i no of no technique or process to "put content of a shape in a cell".
shapes are objects, which have physical characteristics (i.e. length, width, color, etc.) and in order to create them using vba, the creator must define the object + physical characteristics.
what you can do is create a rectangle the size of a cell by depressing the "alt" key when creating the rectangle. the rectangle will be sized that of the cell.
good luck!
-pmover
RE: "= Rectangle 1" Doesn't work!
In order to get the text content from the autoshape you can use vba. Subsequent vba coding can place that text in a cell.
So, if you have the rectangle autoshape on your spreadsheet containing text then the following code extracts the text from the autoshape and places it in cell A1:
ActiveSheet.Shapes("Rectangle 8").Select
Selection.Characters.Text = "THIS IS A TEST"
Range("A1") = Selection.Characters.Text
RE: "= Rectangle 1" Doesn't work!
ActiveSheet.Shapes("Rectangle 1").Select
autoshapetext = Selection.Characters.Text
Range("A1") = autoshapetext
RE: "= Rectangle 1" Doesn't work!