Click to See Complete Forum and Search --> : help


jihan13
October 18th, 2001, 08:13 PM
i want to know what is the different between private and public function or procedure?

srinika
October 18th, 2001, 11:37 PM
Private or Public is the scope
If u define a variable or Procedure or Function as private (or Dim in some cases of Variables), u can access that only within the scope u declared.
Eg. If u declare a function in a form as private u can access that within that form only.
If u define the same as public in a Form, u can use that with the form name eg: x = Form1.MyFunc() ' where MyFunc is a Function defined with a Public scope

This is same for Modules

If u r worried about Func & Procedure, The difference is Function is supposed to return a value and a procedure (Sub Routine) is to do a task only
Srinika

jihan13
October 19th, 2001, 12:02 AM
Thank You

srinika
October 19th, 2001, 12:09 AM
if u r satisfied with the ans Rate the answer
If u want anything to be clarified --> ask!!
Srinika