I know I am going to feel embarassed when I show this to people, but I can't see what I am doing wrong. I've done this before, and compared this to code that works and can't see a difference.
A am attempting to get a list of files from a user. There is a textbox to enter the path to the file into and when they enter any data into it, I would like for another textbox to appear so they can enter another.
Unfortunately, everytime I attempt to load the next object in the control array I get the error "control array element '1' doesn't exist"
I realize that the txtFile_Change could use a rework, but this should give the basic idea. I asume I am missing something really obvious since, this looks like every example I've seen online, in books, and my own code.
Any ideas?
A am attempting to get a list of files from a user. There is a textbox to enter the path to the file into and when they enter any data into it, I would like for another textbox to appear so they can enter another.
Unfortunately, everytime I attempt to load the next object in the control array I get the error "control array element '1' doesn't exist"
Code:
'*** txtFile_Change ************************************************************
'*
'*******************************************************************************
Private Sub txtFile_Change(Index As Integer)
If (Index = txtFile.UBound) Then
If (txtFile.Item(Index) <> "") Then
AddFile
End If
End If
End Sub
'*** txtFile_Change ************************************************************
'*** AddFile *******************************************************************
'*
'*******************************************************************************
Private Sub AddFile()
Dim i As Long
i = cmdBrowse.Count
Load txtFile(i)
LayoutTextBox
End Sub
'*** AddFile *******************************************************************
Any ideas?