Edit/Replace using VBA in Excel

  • Thread starter Thread starter Froojam
  • Start date Start date
F

Froojam

Hi I'm a newbie and trying to implement some VBA code that automaticall
runs a the edit replace tool in a number of sheets. The problem I hav
is that I want the What:= & Replace:= values to refer to cells on a
index sheet (i.e not the activesheet).

Can anyone please help.

Thanks
 
Fully qualify the range object:

What:=ThisWorkbook.Worksheets("Index Sheet").Range("A3").Value
Replace:= ThisWorkbook.Worksheets("Index Sheet").Range("A4").Value

HTH,
Bernie
MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top