Global Macro for Replace All


I have a few different macros running in my set-up but I keep getting road-blocked by a Find and Replace Macro. I need a macro that finds one color, say Yellow, and replaces it with another, say Red. Seems simple. I've recorded it and it works flawlessly, as long as the shapes it's replacing are the same for every design on the page. But as soon as I try to run the same macro on a different design, it fails saying:

"Run-Time error '-2147024809 (8000700057)':

Parameter Index is out of range. It's Value must be between 1 and 0.

Then I debug and it seems the error is that even though the macro was recorded to Find and Replace All, it's only recording the actual shape that was replaced. So if I recorded the macro and there was only one shape on the page that was yellow, it turns it to red just fine. But, if I have two or more shapes on the page, it crashes. 

Is there a way to record, or code, a "Find All" yellow shapes on the page and "Replace All" with another color. I can see in my other macros that you can record "Ctrl A" for Select All, but I can't find a way to record a Find All or Replace All.