VBA for Excel - replace over several tabs

  madwab 13:12 09 Nov 2004

If I select several tabs in Excel (2000) and use find/replace, it finds and replaces occurences of the target in all selected tabs. However if I use


(for example) followed by

Cells.Replace What:="xxx", Replacement:="yyy"

...only the active tab of those selected is affected. What am I missing?


Try adding the activate line





  madwab 12:19 10 Nov 2004

I began to realise last night that there was a distinction in VBA between selecting and activating a range of sheets, which doesn't apply when selecting the same range with the mouse. I haven't tested your suggestion yet, but I'm confident it will work - thanks!

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

Photoshop CC 2018 released with new Curvature Pen and better brush tools

Camera tips to take better iPhone photos

Les meilleures applications de covoiturage 2017