File being used by another process

mjcoon

Well-Known Member
Licensed User
... Incidentally, what is the correct syntax for calling a sub in another module if you don't use 'callsub'? I have tried various alternatives without success.

Me Sir; me, Sir... I can answer that one!

The call is the same as if in the same module (name, perhaps with parameters) but with the module name in front separated by a period, as in:
modulename.subname(...)

Did you find a problem with that? N.B. You must put "Public" in front of the "Sub" keyword in the Sub's home module because the default is that the Sub is private to that modlule otherwise. I imagine you would have to do that with CallSub() too...

Regards, Mike.
 

jschuchert

Active Member
Licensed User
Longtime User
Thank you, Mike, I had also tried that variation but failed to leave the word "sub" after "Public" in the sub itself. I tried it again and it works, of course, after having it explained to me. You guys are great. After having no replies to begin with, now there are 2 pages. Maybe we can put this baby to bed now. :sign0098:everybody.

Jim
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…