Unfortunately, there is no such a thing as a variable type called "InputDataFromMyTestSessionOnThisParticularCase".
But you can create it. Nice? Easy? Yup:
Create your new type of variable, called e.g. TestResult (or anything you want), composed of several conventional variable types proposed by VB6. Once this new variable is created, you can declare an array of this new type of variant. Each component inside the new variable can be accessed separately (read from and write to it).
For an example, do exactly as described:
1. create a new project in VB6
2. click on project in the menu bar, select Add Module
3. double click on this new module to open it
4. copy and paste the following code between ***** lines into the module:
Code:
'********************
'first declare the new type of variable:
Type TestResult
Today As Date
TimeOfTest As String * 8 'rem: means 8 characters in each string
Var1 As Single 'or Integer if ther are no decimals
Var2 As Single
Var3 As Single 'even more "Varx" as you need them
End Type
'then declare the array made of your new type of variable:
Public TestResults(100) As TestResult
'*********************
5. get back to the form in your project
6. place a humble command button on your form, called Command1 (what a humor!)
7. double click on it, and copy and paste the following code (also between the ****** lines:
Code:
'*********************
Private Sub Command1_Click()
TestResults(50).Var1 = 5.2
Debug.Print TestResults(50).Var1
Debug.Print TestResults(50).Var2
End Sub
'*********************
8. run the application (press F5)
9. click on the button on the screen, and stop the application
10. look at the debug-window: you should read 5,2 (result of TestResults(50).Var1 containing that value) and 0 (result of TestResults(50).Var2 which is still empty).
Understood how it works? You can put any type of VB variables inside your own new variable. Further inside your code, separate the new variable name by a dot (.) to its component in order to access one of its component.
If you don't know how many items you will need to put in your array, declare a dynamic array and apply in your code the "Redim" method or the "Redim Preserve" method to e.g. increment the array before writing to it.
If any problem, email me.
Good luck.
Vincent.
reach me at vincent.mairiaux@yucom.be