PC Review


Reply
Thread Tools Rate Thread

Code to search and replace info on modules

 
 
=?Utf-8?B?QnJldHQgU21pdGg=?=
Guest
Posts: n/a
 
      12th Jan 2006
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 With Quote
 
 
 
 
Tom Ogilvy
Guest
Posts: n/a
 
      12th Jan 2006
Here is a start

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

--
Regards,
Tom Ogilvy


"Brett Smith" <(E-Mail Removed)> wrote in message
newsB7DD16E-C467-4556-B0EB-(E-Mail Removed)...
> 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 With Quote
 
=?Utf-8?B?QnJldHQgU21pdGg=?=
Guest
Posts: n/a
 
      12th Jan 2006
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" <(E-Mail Removed)> wrote in message
> newsB7DD16E-C467-4556-B0EB-(E-Mail Removed)...
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible to do a search/replace in the IDE Code window with VBA? EagleOne@discussions.microsoft.com Microsoft Excel Programming 7 7th Aug 2009 03:55 PM
Using code to replace code modules PO Microsoft Excel Programming 1 4th Apr 2008 12:26 PM
Search-and-replace code =?Utf-8?B?TXVydGh5?= Microsoft VC .NET 0 6th Jul 2005 10:23 AM
Find and Replace code in Sheet modules =?Utf-8?B?Sm9u?= Microsoft Excel Programming 11 29th Mar 2005 11:51 PM
Search and Replace code dwight Microsoft Access Forms 1 12th Apr 2004 05:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:22 AM.