Create common functions library

  • Thread starter Thread starter Ellis Yu
  • Start date Start date
E

Ellis Yu

Dear all,

I want to create some kinds of common functions like "Instr"
function in microsoft.visualbasic library. I create a new project and a
module to store all these kinds of functions inside. But when I import this
library in another project, it can find the functions inside. And I try put
the keyword "shared" in the function declaration, but it didn't allow me to
do so. But I check with the help. The "instr" function is put in the module
"String " under the library "microsoft.visualbasic " and declared as "Public
Shared Function". I don't know what's wrong in my procedures. Anyone would
help? Thanks

Best Rdgs
Ellis
 
Ellis Yu said:
I want to create some kinds of common functions like "Instr"
function in microsoft.visualbasic library. I create a new project and a
module to store all these kinds of functions inside. But when I import
this
library in another project, it can find the functions inside.

Make sure the module's access modifier is set to public. When omitting the
modifier, the module will be marked as 'Friend':

\\\
Public Module Foo
Public Sub Goo()
...
End Sub
End Module
///
 
Back
Top