I’m not sure I followed all of that exactly. Are you wanting to automate the changing of the object names within the universe? If so, this utility might be of interest to you.
If you have already made the changes to the universe, then no VBA is needed. The reports use an internal number, not the name, to identify the object. The new names will be picked up automatically. The only problem would be if you are making the changes to a “different” universe (file, save as). When you repoint a data provider to a new universe, it DOES rely on the object names. Now that I re-read your message, I fear this is the case, right?
So you want VBA to change the data providers then, correct? I’m afraid you are in for a LOT of work. First, objects in a data provider can’t be changed at all. The properties are read-only. You would have to delete the old object and add the new object. If the new object name is different, the report will “break” (cells removed from tables and the like) when you save the data provider. If the objects are used as conditions, then it gets even more tedious (like retaining any nested and / or logic).
My suggestion is that you seriously consider making the changes to the original universe. If that is unacceptable, make a copy of the original universe, repoint all the data providers to the new universe BEFORE any changes are made (this can be automated). By doing it this way, the object names won’t matter.
What is the extent of the changes? Mostly object name changes? The utility I mentioned above can help. It can also be modified to change select statements or any property if the volume is large enough.
Sorry to be the bearer of bad news
.
Dwayne Hoffpauir
(BOB member since 2002-09-19)