ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Edit text of shape without selecting it (https://www.excelbanter.com/excel-programming/388545-edit-text-shape-without-selecting.html)

bony_tony

Edit text of shape without selecting it
 
Hi,
I've got the following which edits the text on a shape;

ActiveSheet.Shapes("Button 12988").Select
Selection.Characters.Text = "More Info"

I assumed

ActiveSheet.Shapes("Button 12988").Characters.Text = "More Info"

would do the same thing, but it gives me an error.
How do edit the text without selecting the shape??

Thanks
Tony


Vergel Adriano

Edit text of shape without selecting it
 
Tony,

Try it this way

activesheet.shapes("Button 12988").OleFormat.Object.Caption="More Info"


--
Hope that helps.

Vergel Adriano


"bony_tony" wrote:

Hi,
I've got the following which edits the text on a shape;

ActiveSheet.Shapes("Button 12988").Select
Selection.Characters.Text = "More Info"

I assumed

ActiveSheet.Shapes("Button 12988").Characters.Text = "More Info"

would do the same thing, but it gives me an error.
How do edit the text without selecting the shape??

Thanks
Tony



bony_tony

Edit text of shape without selecting it
 
Thanks mate

On May 2, 2:06 pm, Vergel Adriano
wrote:
Tony,

Try it this way

activesheet.shapes("Button 12988").OleFormat.Object.Caption="More Info"

--
Hope that helps.

Vergel Adriano



"bony_tony" wrote:
Hi,
I've got the following which edits the text on a shape;


ActiveSheet.Shapes("Button 12988").Select
Selection.Characters.Text = "More Info"


I assumed


ActiveSheet.Shapes("Button 12988").Characters.Text = "More Info"


would do the same thing, but it gives me an error.
How do edit the text without selecting the shape??


Thanks
Tony- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 02:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com