I am trying to create a function which stores some information in an array. I can get the information displayed in the array but only within the module. I cannot get it stored in the specified array in under the command button. Here is an example:

Code:
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

        Dim Values() As String
        Dim i As Integer

        Test("Test", Values)

        For i = 0 To UBound(Values)
            MsgBox(Values(i))
        Next
End Sub

Public Function Test(ByVal Tst As String, ByVal Values() As String)
       Dim i As Integer
       
       For i = 0 To 10
             Redim Preserve Values(i)
             Values(i) = i
       Next
End Function
The problem with the above example is that the command button does not get the values of the array. Does anyone know how this might be done?