Change Shape color

balvy

New Member
Joined
Nov 14, 2013
Messages
11
Good day,
In Powerpoint i added a shape and on click i need it to change color. when i go to a new slide i need it to return to the original color set. the macro i have set up is
Code:
Sub changecol(oshp As Shape)    On Error GoTo errhandler
    oshp.Fill.ForeColor.RGB = RGB(25, 200, 0)
    Exit Sub
errhandler:
    MsgBox "Sorry there's an error"
End Sub
but all that does is change the color but i have to manually change it back.

i need to be able to add the code to multiple shape using the action button on PowerPoint.

Thank you for your time.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
there is no code to change it back - a macro to go to next slide rather than using page down and then the code could change colour back before going to new slide......
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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