Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Way to change a single line of vb code in several hundred excel files?
Hello :-)
Recently, we bought a new server for our company's network, and moved all our files over from the old one to the new one. In order for all of our old files created with a specific word macro to work, a line must be changed from \\oldserver\old folder1\oldfolder2\ to \\newserver\new folder1\new folder2\ Instead of manually going into each of these several hundred files, opening up the visual basic editor, and changing them manually, is there a way to either: 1. run a macro on microsoft word every time it opens that looks at the file when it is opened and If path == \\oldserver, then change to \\newserver or something like that 2. run a windows script or program that looks at all the excel files in a given folder, and looks at the visual basic code. If it finds a certain line of code, change it to the correct line of code. Is there anything out there like this? I tried to search the web but I wasn't really sure what it was called that I needed so I didn't have much luck. Thanks in advance --- Message posted from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Way to change a single line of vb code in several hundred excel files?
We had to do the same sort of thing here are work. We
didn't find any workaround to it. :( But remember if you have to do it by hand use a find and replace. -----Original Message----- Hello :-) Recently, we bought a new server for our company's network, and moved all our files over from the old one to the new one. In order for all of our old files created with a specific word macro to work, a line must be changed from \\oldserver\old folder1\oldfolder2\ to \\newserver\new folder1\new folder2\ Instead of manually going into each of these several hundred files, opening up the visual basic editor, and changing them manually, is there a way to either: 1. run a macro on microsoft word every time it opens that looks at the file when it is opened and If path == \\oldserver, then change to \\newserver or something like that 2. run a windows script or program that looks at all the excel files in a given folder, and looks at the visual basic code. If it finds a certain line of code, change it to the correct line of code. Is there anything out there like this? I tried to search the web but I wasn't really sure what it was called that I needed so I didn't have much luck. Thanks in advance --- Message posted from http://www.ExcelForum.com/ . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Way to change a single line of vb code in several hundred excel files?
bball887 wrote in
: Is there anything out there like this? I tried to search the web but I wasn't really sure what it was called that I needed so I didn't have much luck. http://msdn.microsoft.com/library/de...l=/library/en- us/vbext98/html/vaobjcodemodule.asp May help you. It gives you access to the code text and you could write a script to search and replace the relevant strings. Paul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change a Figures into text in my excel exp. 200-two hundred | Excel Worksheet Functions | |||
Combining a few hundred excel files into one | New Users to Excel | |||
how do you execute single line of code? | Excel Discussion (Misc queries) | |||
How do I change multi-line entries to single line entries in Exce. | Excel Worksheet Functions | |||
Way to change a single line of vb code in several hundred excel files? | Excel Programming |