i've got a procedure that i cannot seem to call from within another project
(both loaded via the Startup folder). it'll work if they're in the same
project, but different modules. aside from an instance of Option Private,
which i don't have, is there anything else that might cause this? (or is this
actually expected behaviour and i've just misunderstood the documentation...)
thanks!
quartz - 24 Aug 2006 22:25 GMT
Sorry, I think I misread your post in my first answer. To call a Subroutine
in another file you use the syntax:
Application.Run "'myDrive\myPath\myFileName.doc'!MySubrountine"
That's a double quote, then a single quote, the full path to the file, then
an exclamation, then your Public subroutine name.
HTH
> i've got a procedure that i cannot seem to call from within another project
> (both loaded via the Startup folder). it'll work if they're in the same
[quoted text clipped - 3 lines]
>
> thanks!
quartz - 24 Aug 2006 22:26 GMT
If you are trying to call a subroutine try using the keyword "Public" in
front of the name as in: Public Sub MyRoutineName()
"Public" makes it visible to all modules within the same file. "Private"
does the opposite.
Likewise, if a function use: Public Function MyFunctionName()
HTH
> i've got a procedure that i cannot seem to call from within another project
> (both loaded via the Startup folder). it'll work if they're in the same
[quoted text clipped - 3 lines]
>
> thanks!
Jezebel - 24 Aug 2006 23:11 GMT
Apart from the Call method, an alternative is to add to your project a
reference to the other project -- its public objects then become available
to your code.
> i've got a procedure that i cannot seem to call from within another
> project
[quoted text clipped - 6 lines]
>
> thanks!