You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
-
1Well, this begs the question why there is not one global function that all the pages can use? Why copy code over and over? Anyway, I would do a shift-ctrl-f (that's a global find). Type in "Function FExample", and now you have a "list" of all locations of that function, and thus can work your way though that list - and use a "paste" into that routine. But really, why not have ONE function that all pages call?Albert D. Kallal– Albert D. Kallal2025年01月23日 20:17:32 +00:00Commented Jan 23, 2025 at 20:17
-
@AlbertD.Kallal Yes, a refactoring to a new call to a common function as you mentioned. We’ve got hundreds of occurrences of the function so I was hoping for an automated way to replace them all.user1946932– user19469322025年01月23日 20:26:04 +00:00Commented Jan 23, 2025 at 20:26
-
Well, the global shift-ctrl-f to find and search the whole project probably is a good start. I suppose you could consider a global find/replace, but that would assume an exact match. There can't be that many instances here - and the shift-ctrl-f to global find will produce a VERY nice "hit list" of results, and that list can be used to work your way though each instance......Albert D. Kallal– Albert D. Kallal2025年01月23日 20:31:57 +00:00Commented Jan 23, 2025 at 20:31
-
@AlbertD.Kallal Perhaps a global file find and replace using regex could replace the content of all text starting with "Private Function fExampleA() As Boolean" and ending with "End Function" with the new function code.user1946932– user19469322025年01月23日 20:37:29 +00:00Commented Jan 23, 2025 at 20:37
-
1Hum, well, you could try pasting in the whole routine match - see if it works. I just think doing one by one would not take all that long "once" you have the search hit list. So, often people are not aware of the shift-ctrl-f for the global find (and/or replace). I think once you done the global find, then working though the hit-list is a better approach then actually using find + replace.Albert D. Kallal– Albert D. Kallal2025年01月23日 20:52:38 +00:00Commented Jan 23, 2025 at 20:52
lang-vb