Ive had my head stuck on this for about an hour and just searched the internet with no luck.
So here it is.
I have the following code. I need the code to write the 'data()' to the tabpage, NOT the tab name itself.
My tabs are named: Answer 1, Answer 2, Answer 3, Answer 4.
But with my code they rename to the piece of text file I have specified.
I know the reason its wrong is because it says tabpage.text = data() but what would I put in place of .text to make it write to the page and not the tab title itself?
Public Class Form1 Dim data() As String Dim numOfQuestions As Integer = 0 Const partsOfQuestion As Integer = 5 Public quizQuestions(0, partsOfQuestion) As String Dim questions As ArrayList = New ArrayList Dim position As Integer Private fileread As New System.IO.StreamReader("file2.txt") Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles MyBase.Load Data = fileread.ReadLine().Split(",") 'reads the file to the app depending on the data chosen. ListBox.Items.Add(data(0)) TabPage1.Text = data(1) TabPage2.Text = data(2) TabPage3.Text = data(3) TabPage4.Text = data(4) answercb.Text = data(5) End Sub