Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Code to search and replace info on modules

I am looking to write an automated program in VBA where it will search and
replace several variables with updated names. I also need to update
different template or VBA projects in order to do this because there are many
Excel projects that also need to be updated in the same directory. How would
I code this to automatically open up Excel worksheets, replace variables in
the VBA macro code in order to update it, and then close it when done. Then
it would open up the next Excel worksheet. Anybody have an idea?

Brett
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code to search and replace info on modules

Here is a start

http://www.cpearson.com/excel/vbe.htm

--
Regards,
Tom Ogilvy


"Brett Smith" wrote in message
...
I am looking to write an automated program in VBA where it will search and
replace several variables with updated names. I also need to update
different template or VBA projects in order to do this because there are

many
Excel projects that also need to be updated in the same directory. How

would
I code this to automatically open up Excel worksheets, replace variables

in
the VBA macro code in order to update it, and then close it when done.

Then
it would open up the next Excel worksheet. Anybody have an idea?

Brett



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Code to search and replace info on modules

Thanks Tom. This should be a good start. Thanks once again. I will use
this and apply a change text sub as opposed to the delete or add text sub
when writing a VBA macro. But how do you search all subdirectories within a
given directory and be able to change modules from there?

Brett

"Tom Ogilvy" wrote:

Here is a start

http://www.cpearson.com/excel/vbe.htm

--
Regards,
Tom Ogilvy


"Brett Smith" wrote in message
...
I am looking to write an automated program in VBA where it will search and
replace several variables with updated names. I also need to update
different template or VBA projects in order to do this because there are

many
Excel projects that also need to be updated in the same directory. How

would
I code this to automatically open up Excel worksheets, replace variables

in
the VBA macro code in order to update it, and then close it when done.

Then
it would open up the next Excel worksheet. Anybody have an idea?

Brett




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
Search and replace chunks of html code method373 Excel Discussion (Misc queries) 0 March 27th 06 03:46 PM
Find and Replace code in Sheet modules Jon Excel Programming 10 March 29th 05 10:15 PM
When to code in sheet or userform modules and when to use modules Tony James Excel Programming 1 December 16th 04 10:02 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Ed[_18_] Excel Programming 4 May 20th 04 02:08 PM
Excel XP VBA code to search all macro code in Excel module for specific search string criteria Frank Kabel Excel Programming 0 May 19th 04 08:11 PM


All times are GMT +1. The time now is 09:09 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"