Re: Public variable
- From: "Eric" <eric@xxxxxxxxx>
- Date: Sun, 18 Mar 2007 02:28:26 -0400
Thanks Jim, I got it to work...
"Jim Cone" <jim.coneXXX@xxxxxxxxxx> wrote in message
news:%23IRw4VRaHHA.4772@xxxxxxxxxxxxxxxxxxxxxxx
variable.
Eric,
1. An Auto_Open sub must be in a standard module, not in the
ThisWorkbook module or a *** module.
2. If you are opening the workbook using code then any Auto_xxx
subs will not run. Your have to use the RunAutoMacros method.
3. The public declaration of the variable should be in standard module.
4. The Workbook_Open event sub could also be used to initialize the
--module,
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
"Eric" <eric@xxxxxxxxx>
wrote in message
Hello,
I am setting up a public variable in the declaration section of my module
(Public Authorized_Machine as string)
I initialize the variable right in the Auto_open() sub expecting ths
variable and its value to be available to all the procedures in my
but it does not work.
A simple "MsgBox Authorized_Machine" (in a seperate procedure) shows the
variable empty...
What am I doing wrong?
Thank you.
Eric
.
- References:
- Public variable
- From: Eric
- Re: Public variable
- From: Jim Cone
- Public variable
- Prev by Date: Re: Public variable
- Next by Date: Re: Public variable
- Previous by thread: Re: Public variable
- Next by thread: Re: Public Variable
- Index(es):