Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba
Thread: Global variants

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Global variants
Sueprnaut 29.09.2006 10:38:01
Hi,
I need a little help. I have two procedures in my code:

Private Sub Form_Open(Cancel As Integer)
.....
Dim Arr() As Variant
.....
End Sub

Private Sub Form_Close()
.....
End Sub

In the first procedure I create and populate an array. How can I use this
array in the Form_Close procedure? Is there a way to define global variants?

Re: Global variants
Stefan Hoffmann <stefan.hoffmann[ at ]explido.de> 29.09.2006 10:49:58
hi,

Sueprnaut wrote:
[Quoted Text]
> In the first procedure I create and populate an array. How can I use this
> array in the Form_Close procedure? Is there a way to define global variants?
Declare your array at the beginning of the form module as

Private m_Arr() As Variant


mfG
--> stefan <--
RE: Global variants
Klatuu 29.09.2006 15:52:02
Do the Dim at the module level, that is right after the Options statements in
the Form module. That way it is visible to all procedures in the module.

"Sueprnaut" wrote:

[Quoted Text]
> Hi,
> I need a little help. I have two procedures in my code:
>
> Private Sub Form_Open(Cancel As Integer)
> ....
> Dim Arr() As Variant
> ....
> End Sub
>
> Private Sub Form_Close()
> ....
> End Sub
>
> In the first procedure I create and populate an array. How can I use this
> array in the Form_Close procedure? Is there a way to define global variants?
>

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net