TheWennerWoman
Active Member
- Joined
- Aug 1, 2019
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
Hello, I am trying to populate a cell (named range) with what the user has selected but I don't seem to be able to get this working.
Any pointers appreciated as always.
Any pointers appreciated as always.
Code:
Sub status_folder()
Dim fldr As FileDialog
Dim sItem As String
Dim fileSaveName As String
Dim file_4 As String
Set fldr = Application.FileDialog(msoFileDialogFolderPicker)
With fldr
.Title = "Select a folder to save Policy Status file to"
.AllowMultiSelect = False
.InitialFileName = "O:\Finance\"
If .Show <> -1 Then Range("file_4").Value = .SelectedItems(1)
sItem = .SelectedItems(1)
GoTo NextCode
'End If
End With
NextCode:
Set fldr = Nothing
file_4 = Range("file_4").Value
End Sub