Edit wordart in a grouped object using a macro

EllieCat

New Member
Joined
May 9, 2007
Messages
44
I'm not entirely certain this is even possible, I'm having real trouble with it.

I have a button which runs a macro, which consists of an autoshape rectangle, a piece of clipart, and then a piece of wordart layered on top, all grouped together.

As part of a macro, I want to be able to change the text of the wordart, and change the assigned macro (i.e. the macro initially changes the backgrounds on graphs to white for a print-friendly version, once it's run I want the text to change from "Print Version" to "Screen Version" and be linked to the macro which puts the colours back)

I can't seem to select the wordart object within a macro to change the text (if I have macro recording on I can't select the wordart object, if I start with it selected and "edit wordart" then the change isn't made and nothing is recorded, and if I manually set the Shapes("Wordart 1") which I know it should be, I get a runtime error as object not found)

Is it possible to use a macro to degroup, select the wordart, change the text, regroup and assign the new macro, and if so is it possible to force it to keep the same identifier for the object?

Can anyone suggest an alternative way around this?

Thanks!

EllieCat
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
as for the second part (i.e. ungroup / regroup), something like this

Rich (BB code):
ActiveSheet.Shapes("ObjOld").Ungroup ' ungroups ObjOld

' rest of code runs here

ActiveSheet.Shapes("Rect1").Select ' selects only one object from the old group
Selection.ShapeRange.Regroup.Select ' Regroup groups the same selection
Selection.Name = "ObjOld" ' names the new group with
 
Upvote 0
Thank you very much!

I had to force a name onto the wordart itself as well as the group, but once that was done this works like a charm.

EllieCat
 
Upvote 0

Forum statistics

Threads
1,223,248
Messages
6,171,011
Members
452,374
Latest member
keccles

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top