Forum Discussion
ber999
Jan 14, 2021Brass Contributor
Access of Text in an Excel Autoshape with vba
How can I access Text in an Excel Autoshape with vba (see worksheet in attached file)?
HansVogelaar
Jan 14, 2021MVP
For example:
Dim strText As String
strText = ActiveSheet.Shapes(1).TextFrame2.TextRange.Text
If you know the name of the shape, you can use that: change Shapes(1) to Shapes("Flussdiagramm: Prozess 1")
ber999
Jan 15, 2021Brass Contributor
Hallo Hans,
thank you very much. I have found this method at several places in the internet. But, why does not work?
- HansVogelaarJan 15, 2021MVP
Do you get an error message? If so, what does it say?
- ber999Jan 15, 2021Brass Contributor
Hi Hans,
thank you for the answer. It seems that some shapetypes have a different object model. I am looking for an object model for the Autoshapes. HansVogelaar
- HansVogelaarJan 15, 2021MVP
The code works in the workbook that you attached. I'd have to see an example of where it fails.