Say if i had the following code...
VB Code:
'This is in a module Public Word_Str() As String Public Sub Send_Words(Amount_Of_Words As Integer) ReDim Word_Str(0 To Amount_Of_Words) For I = 0 To Amount_Of_Words Word_Str(I) = Get_Random_Word 'This is just a function that produces a 'random word of any length when called. Next I End Sub
Now if i call this sub from a form the data that i get back is null and there's only one array (just 0) in the actual array, but if i call it from the same module the code works fine. Also if i don't ReDim the array it works, but i can't have a variable array.
Can any one help me make it so that i can still have the public array that it variable and not turning the sub into a function and so that i can read it from any other part of the project.




Reply With Quote