Public variable

W

Wavequation

I am calling a public sub from a form, and I am trying to get the sub to be
able to access a variable from the form. I declared the variable as public
in the forms code, but it isn't available to the subroutine... is this normal?
 
Joined
Mar 15, 2011
Messages
19
Reaction score
0
Is the public sub declared in the same module as the public variable?

i could imagine that having the public sub declared in an external module to the public variable might cause problems, despite them being public they might be being declared at different times, in which case your sub might be referencing a variable that has not been declared yet.

i'm just guessing though. can you give me some examples?
 

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

Similar Threads

Form Name as Variable 1
Ribbon Invalidate error 91 2
Variable in public function 9
Is it worth the effort?? 1
VBA CODE HELP! 0
Using a public variable 2
Passing Variable Value 1
Access 2003 Public Variables 7

Top