Create common functions library

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
 
H

Herfried K. Wagner [MVP]

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
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top