This is what I just learned :
lets say we have:
1-Module1
2-class1
3-class2
4-function1()
and you want to call the function to in class2:
If you create the function in the module as public, then you can call it just by the name:
function1()
that's what you write it in class2 or any class in the project
If you create the function in class1 and want to use it in class2, now we have two ways to declare the function in class1:
A- Public function1 (ByVal ---- as datatype ) as datatype
This make you have to create instance to use the function, like the follow:
dim ins as New class1
ins.function1()
that's what you write it in class2 or any class in the project,
B- Public Shared function1 (ByVal ---- as datatype ) as datatype
this make you don't need to use the instanse when you call the function,like the follow:
class1.function1()
That's what you write it in class2
It works with me