Renaming a UDF param renames the params of ALL UDFs.

  • Thread starter Thread starter Jim Luedke
  • Start date Start date
J

Jim Luedke

Will someone please tell me why, when two VBA functions have
identically-spelled parameters, e.g.:

Func1(ByVal MyParam1 as <Something>, <More params>)
Func2(ByVal MyParam2 as <Something>, <More params>)

then, when I rename Func1 parameter "MyParam1" to "MyOwnParam1", VBA:

===> renames the spelling of Func2's param to "MyOwnParam1" as well?

What is *with* this sick language?

Is there some Option (akin to Option Explicit) I don't know about,
that turns this off?

***
 
When you evoke the Replace dialog box, take a look at the lower left corner
of it... there is a Search frame containing some OptionButtons that allow
you to control what gets replaced. Just put your text cursor in the
procedure you want to change, select the Current Procedure OptionButton from
the Search frame and that will restrict your replacement to only the text in
the procedure the text cursor it in. Alternately, you can select all the
text in the code you want to do the replacement in, select the Selected Text
OptionButton and your replacements will be restricted to just the selected
text. These, coupled with the other two OptionButtons, allows you quite a
bit of flexibility and control in a replacement (or Find for that matter)
operation.
 
Back
Top