G
gw.boswell
Can someone explain to me why when the following code executes, the
filename shown in the message box for the first iteration is the last
file name selected in the multiple selection. The second iteration
show the first file name selected and continues on in order until the
next to last file name selected.
Dim FileToOpen As Variant
FileToOpen = Application.GetOpenFilename("TableFiles (*.prn), *.prn", ,
"Name of Files to Use", , True)
counter = 1
Do While counter <= UBound(FileToOpen)
MsgBox FileToOpen(counter)
counter = counter + 1
Loop
End Sub
TIA
Garry
filename shown in the message box for the first iteration is the last
file name selected in the multiple selection. The second iteration
show the first file name selected and continues on in order until the
next to last file name selected.
Dim FileToOpen As Variant
FileToOpen = Application.GetOpenFilename("TableFiles (*.prn), *.prn", ,
"Name of Files to Use", , True)
counter = 1
Do While counter <= UBound(FileToOpen)
MsgBox FileToOpen(counter)
counter = counter + 1
Loop
End Sub
TIA
Garry