Find And Replace

  • Thread starter Thread starter Minitman
  • Start date Start date
M

Minitman

Greetings,

Is it possible to do a find and replace across multiple workbooks?

Any help will be appreciated.

-Minitman
 
When I want to do something to multiple workbooks I write two macros, one to
Open and close each file in a directory, and the other to do the change.
Just step through the directory one file at a time, open, do change, save,
close.....open next file, etc.

Vaya con Dios,
Chuck, CABGx3
 
Hey Chuck,

Thanks for the reply.

Do you have an example of your two macros you could post?

-Minitman
 
Those sort of things are kinda custom to each application, but here's one I
use to open files and extract info
It may give you a starting point.

Sub GetFiles()
Dim strFile
Dim strFolder
Dim OpenFile
strFolder = Range("DATA!P2").Value & "\" '"c:\Documents and setting\My
Documents\TestExcel\"
strFile = Dir(strFolder & "*.*", vbNormal)
Do While strFile <> ""
Application.DisplayAlerts = False
Application.Workbooks.Open (strFolder & strFile)
OpenFile = ActiveWorkbook.Name
'************************************
'do thing to each file
Call ExtractData 'This is the second macro to do whatever
'************************************
strFile = Dir
Windows(OpenFile).Activate 'return to the newly opened Invoice workbook
ActiveWindow.Close 'close the newly opened Invoice workbook
Loop
Application.DisplayAlerts = True
Sheets("database").Select
Range("a15").Select 'parks the cursor
End Sub

Vaya con Dios,
Chuck, CABGx3
 
Back
Top