Re: Public variable
- From: "Eric" <eric@xxxxxxxxx>
- Date: Sun, 18 Mar 2007 02:29:55 -0400
I had this too...
Eric
"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:Oqf$WiRaHHA.3612@xxxxxxxxxxxxxxxxxxxxxxx
i don't have any luck when i have this in thisworkbook:module
Option Explicit
Public RptFlag As Boolean
Public cnt As Long
Public iRow As Long
Public iMonth As Long
Public eMonth As Long
fails to compile because it says the variables aren't defined.
--
Gary
"Leith Ross" <LeithRoss@xxxxxxxxx> wrote in message
news:1174191805.789539.231750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Mar 17, 7:50 pm, "Eric" <e...@xxxxxxxxx> wrote:
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
thebut it does not work.
A simple "MsgBox Authorized_Machine" (in a seperate procedure) shows
variable empty...
What am I doing wrong?
Thank you.
Eric
Hello Eric,
The Auto_Open, Auto_Close, Auto_Activate, and Auto_Deactivate macros
are provided for backward compatability. You should be using
Workbook_Open instead of Auto_Open. Place your Public varaiable in the
Declarations section of ThisWorkbook and placce your Auto_Open code
in the Workbook_Open procedure.
Sincerely,
Leith Ross
.
- References:
- Public variable
- From: Eric
- Re: Public variable
- From: Leith Ross
- Re: Public variable
- From: Gary Keramidas
- 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):
Relevant Pages
|