Hi everyone, im trying to get a Userform which allows a user to chose a file and edit it from the form. I was successful in having it be able to edit from the userform, however the only thing left is that when I select a folder, it only shows me the files within the folder, I want it to display the files and all the files within the subfolders as well. I've been at it a couple of days, and would appreciate any help from you guys.
thanks!
Code:
Sub SelectFolder()Dim sFolder As String
' Open the select folder prompt
With Application.FileDialog(msoFileDialogFolderPicker)
If .Show = -1 Then ' if OK is pressed
sFolder = .SelectedItems(1)
End If
End With
If sFolder <> "" Then ' if a file was chosen
If Right(sFolder, 1) <> "\" Then
sFolder = sFolder & "\"
End If
End If
Txt_BrowseFile = sFolder
Dir1 = Txt_BrowseFile.value
End Sub
thanks!