The reason is - you have 2 loops instead of only one.
Try the following and let me know (btw - I only created 1 textbox in design with index = 0 and rest of them are created at runtime depending on size of you array):
VB Code:
Private Sub cmdSaveInfo_Click() '=============================== Dim strInfo() As String ' My Array for Data Dim strData As String ' Variable that Holds Data Dim i As Integer strData = "Zero One Two Three FOur Five Six Seven Eight Nine" strInfo = Split(strData, Space(1)) For i = 0 To UBound(strInfo) If i > 0 Then Load txtInfo(i) txtInfo(i).Move txtInfo(i - 1).Left, txtInfo(i - 1).Top + txtInfo(i - 1).Height txtInfo(i).Visible = True End If txtInfo(i).Text = strInfo(i) Next i End Sub




Reply With Quote