Reputation: 279
I want to use some functions I created in another .mdb in the project i'm currently working on. I first went in VBA editor (alt+f11) and right clicked -> export... -> save as module1.bas on my desktop then I opened my other project and right clicked -> import -> module1.bas I now see the module1 within my other modules so I use some functions in my code, I clicked save and compile.
Compile Error Sub or Function not defined.
It points functions defined in the module I just exported. If I write :
module1.functionName parameter
It compiles but I usually don't have to type the reference like that. Why is this happening? How to reference my module to my project?
Upvotes: 2
Views: 772
Reputation: 279
Subs and Function were defined as Private in my module. Fixed by putting Public instead.
ie:
Public Sub subName ()
Upvotes: 2