0

Hello everyone,

I am trying to set a global variable in a module so that I can call it from any form or command button. I thought that I would declare the vairable by "public x as double" then set "x = 45" But how do I use "x" in another form

Thanks for the help!

CW

2
Contributors
3
Replies
15
Views
4 Years
Discussion Span
Last Post by tinstaafl
0

First off make sure the name is unique. then declare it as public outside of any sub or function, then use it like any variable.

A little trick I found helpful is include capitals in the variable name. that way when I'm coding, if the name doesn't change I typed it wrong or I don't have access in that code.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.