Re: search and replace code in Excel-projects?



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






.



Relevant Pages

  • Re: search and replace code in Excel-projects?
    ... Basic for Application Extensibility reference. ... you'll have to turn on the "Trust Access to VBA project" setting in the ... Program Manager ...
    (microsoft.public.office.developer.vba)
  • Re: +VBA Project (Filename.mpp) missing
    ... missing the +VBA Project in the Project Explorer Window. ... When opening up the schedule I get several Microsoft Visual Basic - File not ... You've probably lost the vb file associated with the mpp file. ...
    (microsoft.public.project)
  • RE: Trying to acccessing the MSPROJECT Library from VBA in Access
    ... Did you try to reference the MSProject Library in Access already? ... Then you have access to the object model of MSProject and thus are you able ... > don't mean opening a Project from Access, ... > from which I can then create an empty Access table. ...
    (microsoft.public.access.modulesdaovba)
  • RE: Error Message Run Time 2465
    ... properties, but any reference to it ... Closing and opening the form doesn't fix it. ... Remove the form's SQL from its data source field, save the form, and then ... And (Me![Initial Move Scheduled Pickup Date] _ ...
    (microsoft.public.access.formscoding)
  • Re: Event firing for Word
    ... object or reference that we are aware of. ... >> Word opens a blank document or before opening a file. ... >> document word opens before opening the complete file iteself. ...
    (microsoft.public.word.vba.general)