Code:
Sub Generate_Report()
    
    Dim strFileSelected As String
    
    With Application.FileDialog(msoFileDialogFilePicker)
        .AllowMultiSelect = False
        .ButtonName = "Open"
        .Filters.Clear
        .Filters.Add "Excel Files", "*.xls*"
        .Filters.Add "CSV File", "*.csv"
        .Title = "Open Raw Data"
        .Show
        If .SelectedItems.Count Then
            strFileSelected = .SelectedItems(1)
        Else
            'MsgBox "Cancelled by user!"
            Exit Sub 'Ideally, should exit from the bottom of the sub-routine.
        End If
        
        MsgBox VBA.FileDateTime(strFileSelected)
        
    End With

End Sub