Public variable

  • Thread starter Thread starter Wavequation
  • Start date Start date
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?
 
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?
 
Back
Top