When you loop X = 1 to 10, you are trying to assign the same text value to each element of the array in your structure. So if TB1 equals "TEST" then every element of the Test1 array is going to be the same value of "TEST" so I am not sure if that is what you are looking to do, it doesn't make much sense to me.

The specific reason for your error is that your elements of your structure (test1, test2, etc.) you declared as arrays, so you need to redim them with an actual bounds before you can use them.

Like

ReDim AllFileFormat.Test1(9)

Keep in mind in .NET all arrays start at index 0, You can't make an array that has a range of 1 to 10 like you could in VB6.