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? >
|