-
An easy question
How can i initialize VB contorls in a loop, e.g. how do I name a TabPage being created in a loop when I want to create and label an unkown number of them.
Like so,
PHP Code:
i = 2
For i = 2 To Pre_WS_Count
Dim PreWSi As New TabPage()
PreWSi.Text = "PreWS " & Str(i))
etc..
Next i
where I want the i in PreWSi to be a number that corresponds to the loop index. I basically don't know how to get the i to label properly where the desired output is.....
PreWS1
PreWS2
PreWS3
etc...
-
Hi
i = 2
For i = 2 To Pre_WS_Count
Dim PreWSi As New TabPage()
PreWSi.Text = "PreWS " & i
myTabControl.TabPage.Add(PreWsi)
etc..
Next i
-
So just leaving it as PreWSi will work?
-
As long as don't forget to add the pages.