Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default A Macro to Do Find and Replace

Hi All, I am writing a macro in Excel 2002 to scan through
a large volume of Excel files trying to find an old
Website name and replace them all with a new one.
Manually, i would go to Excel's VB Editor and go to the
Toolbar to select the Find and Replace All function for
each file. In this macro, how do i call the built-
in "Find" function and automate this process that is able
to update multiple files in one shot?

Thanks all in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A Macro to Do Find and Replace

Eric,

It wouldn't all be in one shot. Firstly you would have to find a way of
identifying all of the files, it could be all files in a directory, or you
could manually build an array. Whatever, once you have the list, you would
open each in turn, iterate through each sheet, do the Find/Replace, save and
close the workbook, and move on.

You could do a macro record of the Find/Replace to get the basic syntax.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Eric" wrote in message
...
Hi All, I am writing a macro in Excel 2002 to scan through
a large volume of Excel files trying to find an old
Website name and replace them all with a new one.
Manually, i would go to Excel's VB Editor and go to the
Toolbar to select the Find and Replace All function for
each file. In this macro, how do i call the built-
in "Find" function and automate this process that is able
to update multiple files in one shot?

Thanks all in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default A Macro to Do Find and Replace

Hello Bob/Everybody,

Could you pls give details for generating that macro? I
tried, but nothing was actually recorded. I serached
through Excel VB help, but only found FileSearch, not text
search in the VB Editor. Thanks! Eric


-----Original Message-----
Eric,

It wouldn't all be in one shot. Firstly you would have to

find a way of
identifying all of the files, it could be all files in a

directory, or you
could manually build an array. Whatever, once you have

the list, you would
open each in turn, iterate through each sheet, do the

Find/Replace, save and
close the workbook, and move on.

You could do a macro record of the Find/Replace to get

the basic syntax.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Eric" wrote in

message
...
Hi All, I am writing a macro in Excel 2002 to scan

through
a large volume of Excel files trying to find an old
Website name and replace them all with a new one.
Manually, i would go to Excel's VB Editor and go to the
Toolbar to select the Find and Replace All function for
each file. In this macro, how do i call the built-
in "Find" function and automate this process that is

able
to update multiple files in one shot?

Thanks all in advance.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and replace macro edeaston Excel Discussion (Misc queries) 3 January 12th 09 10:51 AM
Macro to Find & Replace [email protected] Excel Worksheet Functions 2 September 14th 06 07:17 PM
Macro: Find and replace Bertie Excel Discussion (Misc queries) 1 May 29th 06 02:01 PM
find&replace macro Elainey Excel Worksheet Functions 0 January 6th 06 09:20 PM
Using Find & Replace in macro Bob C[_3_] Excel Programming 11 October 30th 03 07:02 PM


All times are GMT +1. The time now is 11:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"