S
Sabaka
A call to a Public function in the code for a userform object results in an
error message if the "Public" function is in the code for a document object,
but not if the Public function is in a standard module. The error message is
that the function is not defined.
This is puzzling because I thought that declaring a function or variable as
Public made it visible everywhere in a project. Apparently, this is true if
the function or variable is declared as Public in a standard module, but it
is not necessarily true in other contexts.
My question is do I understand this correctly and, if so why is this so? Is
there something special about the code for a document? I'm guessing that the
code for a userform has the same property.
error message if the "Public" function is in the code for a document object,
but not if the Public function is in a standard module. The error message is
that the function is not defined.
This is puzzling because I thought that declaring a function or variable as
Public made it visible everywhere in a project. Apparently, this is true if
the function or variable is declared as Public in a standard module, but it
is not necessarily true in other contexts.
My question is do I understand this correctly and, if so why is this so? Is
there something special about the code for a document? I'm guessing that the
code for a userform has the same property.