Ref a Function

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

I know in a module that you can have a function referenced by any form by
making it Public. Now if it's Private does that mean only one form can
reference it? (This is what I want) If so how do you do this?
Thanks
DS
 
If you want the function available only to one form, you put it in that
form's module and declare it Private. Go to the form in design view, then
view the form's code, and insert the function there. It will then only be
available to that form as long as you declare it Private.
 
I know in a module that you can have a function referenced by any form by
making it Public. Now if it's Private does that mean only one form can
reference it? (This is what I want) If so how do you do this?
Thanks
DS

If you wish only one form to be able to use the function, why place it
in a Module?
Move that function to that Form's code sheet.
 
Back
Top