Sep 21, 2011 #1 gustaf111 Programmer Joined Jan 16, 2011 Messages 87 Location SE How do I declare and use a global array/matrix ?
Sep 21, 2011 #2 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US hi, Module level declaration... Code: Public YourArrayVar() Sub SomeProcedure() '..... ReDim Preserve YourArrayVar([i]...some dimensions ...[/i]) '..... End Sub Skip, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
hi, Module level declaration... Code: Public YourArrayVar() Sub SomeProcedure() '..... ReDim Preserve YourArrayVar([i]...some dimensions ...[/i]) '..... End Sub Skip, Just traded in my old subtlety... for a NUANCE!
Sep 21, 2011 Thread starter #3 gustaf111 Programmer Joined Jan 16, 2011 Messages 87 Location SE Can I have an global array in a sheet ? Do I need Redim ? It worked for me without ... Upvote 0 Downvote
Sep 21, 2011 #4 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US The Public declaration in a Sheet module has only that sheet in scope. However a public declaration in a Module has global scope. Skip, Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
The Public declaration in a Sheet module has only that sheet in scope. However a public declaration in a Module has global scope. Skip, Just traded in my old subtlety... for a NUANCE!