
Sub SelectFolder()
Set objFSO = CreateObject("Scripting.FileSystemObject")
InitialFoldr$ = "C:Documenti" '<<< Startup folder
LR = Cells(Rows.Count, "A").End(xlUp).Row + 1
With Application.FileDialog(msoFileDialogFolderPicker) 'User input for folder to look at
.InitialFileName = Application.DefaultFilePath & ""
.Title = "Please select a folder"
.InitialFileName = InitialFoldr$
.Show
If .SelectedItems.Count = 0 Then Exit Sub
mfolder = .SelectedItems(1)
End With
Cells(LR, 1) = mfolder
End Sub
|
Cells(LR, 1) = Mid(mfolder, 4, 100) |
