A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
Try this syntax
Dim t As String
t = ActiveSheet.Shapes("Rectangle 4").TextFrame.Characters.Text
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
What is the VBA command to reference the text that is in an enclosed shape on a worksheet? I have two rectangles that are used as "check boxes" -- they might have an "X" in them. I need to be able to store that text, if it exists, in a cell on a different worksheet. I'm guessing this is close: rect4 = ActiveSheet.Shapes.Range(Array("Rectangle 4")).Text but apparently ".Text" needs to be something else.
Thanks in advance for any and all help!
Michelle K.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hi,
Try this syntax
Dim t As String
t = ActiveSheet.Shapes("Rectangle 4").TextFrame.Characters.Text
That's exactly what I need!!! Thank you very much -- and especially for that lightning fast response!
Michelle K.