TheShaunMichael
Board Regular
- Joined
- Oct 24, 2009
- Messages
- 57
Hi All,
Need to amend the following code so that 1) my array items are separated by commas and 2) they populate a user form text box titled "tbDocumentName." Thank you!
Shaun
Need to amend the following code so that 1) my array items are separated by commas and 2) they populate a user form text box titled "tbDocumentName." Thank you!
Shaun
Code:
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Application.DefaultFilePath & "\"
.Title = "Please select a folder to list Files from"
.InitialFileName = InitialFoldr$
.Show
If .SelectedItems.Count <> 0 Then
xDirect$ = .SelectedItems(1) & "\"
xFname$ = Dir(xDirect$)
ReDim FileList(0)
i = 0
Do While xFname$ <> ""
xFname$ = Dir
FileList(i) = xFname$
i = i + 1
ReDim Preserve FileList(i)
Loop
End If
End With
Me.tbDocumentName.Value = FileList