Re: global dim & set
From: Amedee Van Gasse (nzrqrr.ina.tnffr_at_rztebhc.or)
Date: 07/27/04
- Next message: Chad DeMeyer: "Re: Lines object in a TextFrame"
- Previous message: Amedee Van Gasse: "Re: outlook express/vb programming"
- In reply to: mcalex: "global dim & set"
- Next in thread: Tushar Mehta: "Re: global dim & set"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 27 Jul 2004 07:08:36 -0700
mcalex wrote:
> Hi all
> I'm a bit new to vb, and want to know if there is a way of declaring
> and setting a global variable outside of any procedures. I have a
> public boolean (debugOn) that runs my debug.print statements if true
> and doesn't clutter the immediate window if false. Everything's fine
> as long as I set it within procedures, but I cannot convince VBA to
> set it outside of a procedure, ie at declaration time. Is this
> possible? and if so, how?
>
> Many thanks
> Alex
Scope of variables:
Application: declare with Public
Module: declare with Private
Procedure: declare with Dim
Read this also:
Using Variables (Properly) In VBA
http://www.cpearson.com/excel/variables.htm
-- To top-post is human, to bottom-post and snip is sublime.
- Next message: Chad DeMeyer: "Re: Lines object in a TextFrame"
- Previous message: Amedee Van Gasse: "Re: outlook express/vb programming"
- In reply to: mcalex: "global dim & set"
- Next in thread: Tushar Mehta: "Re: global dim & set"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|