Re: search and replace code in Excel-projects?
- From: "Rolf Barbakken" <notnoisy@xxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 21:52:11 +0200
Thanks, Patrick.
The shortest route to a solution turned out to be opening each and every
file (about 150) and doing the same change. Crude, but didn't take too long.
For the future, I'm trying to convince the customer to let me place some of
the code on a server (a WS, for instance) to avoid a similar problem
occurring again.
--
_________________
Rolf @ Questus ans
"Patrick Smith [MSFT]" <patsm-nospam@xxxxxxxxxxxxx> wrote in message
news:uclhf$DhGHA.5068@xxxxxxxxxxxxxxxxxxxxxxx
This is a difficult thing to do, but can be done using the Microsoft
Visual Basic for Application Extensibility reference. Adding this as a
reference gives you the ability to program against the VBA OM so that you
can access the project directly.
Other than doing it this way, you'd have to do it manually by opening the
file and making the changes you need to make. Also, in order to do this,
you'll have to turn on the "Trust Access to VBA project" setting in the
applications options.
Hope this helps,
--
thanks,
Patrick Smith
Program Manager
Office Programmability
"Rolf Barbakken" <notnoisy@xxxxxxxxxxxxx> wrote in message
news:%230tpCavgGHA.4304@xxxxxxxxxxxxxxxxxxxxxxx
We have a case where we need to modify about 100 Excel-files to use a
different method of data-access. So we need to open the VBA-project, add
a reference, and change and add code.
Is it possible to do this (some or all) through some kind of search and
replace? Or do we have to open each and every file to fix it?
Any ideas appreciated.
--
_________________
Rolf @ Questus ans
.
- References:
- search and replace code in Excel-projects?
- From: Rolf Barbakken
- Re: search and replace code in Excel-projects?
- From: Patrick Smith [MSFT]
- search and replace code in Excel-projects?
- Prev by Date: Re: Open up an Internet-shortcut from VBA
- Previous by thread: Re: search and replace code in Excel-projects?
- Next by thread: Re:CDO.iMailbox failling
- Index(es):
Relevant Pages
|