Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Macro code in lots of XLS files at once
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00831524
Message ID:
00831563
Views:
15
You can use this member to manipulate with its contents:

objExcel.Application.VBE.ActiveVBProject.VBComponents("Module1").CodeModule

(You may need to loop through VBComponents to find the sub procedure with specific name).

This member has useful properties and functions, like:

.CountOfLines
.Lines(1,.CountOfLines)
.DeleteLines()
.InsertLines()

and so on.

They may help to find a specific procedure name, determine the procedure start and end lines, and replace the text as needed.
Looks like alines() VFP function will be useful here too.


>Hi, all!
>
>I have a problem. My clients have created Eighty (yes, 80) similar Excel files. All have the same VBA code in them. Now they want to change the code. I have changed the code for them. Anyone have a good idea on how to replace one sub in 80 different files?
>
>- George
Previous
Reply
Map
View

Click here to load this message in the networking platform