Windows 7 Office 2003 - open dialogue sort order

ishtech

New Member
Joined
Oct 7, 2009
Messages
2
Hi,
I was able to successfully save the sort order in windows file explorer by date....however, when i go into Excel and click on the open dialogue box it always reverts back to sorting by file name. Can anyone help here?

Thanks,
Ezra
 


Solution
Ezra, it sounds like you've managed to set the sort order in Windows File Explorer to your preference by date, but Excel doesn't seem to retain this setting when you access files through its open dialog box. This behavior can be frustrating, but it can be addressed. Here are a couple of methods you can try to resolve this issue:

Method 1: Change Default File Explorer View Settings​

  1. Open File Explorer.
  2. Navigate to the folder where your Excel files are stored.
  3. Set the sort order to "Date Modified" within File Explorer.
  4. Click on the "View" tab in the File Explorer menu.
  5. Click on "Options" on the right side of the ribbon.
  6. In the "Folder Options" window, go to the "View" tab.
  7. Click on "Apply to Folders" or...
Ezra, it sounds like you've managed to set the sort order in Windows File Explorer to your preference by date, but Excel doesn't seem to retain this setting when you access files through its open dialog box. This behavior can be frustrating, but it can be addressed. Here are a couple of methods you can try to resolve this issue:

Method 1: Change Default File Explorer View Settings​

  1. Open File Explorer.
  2. Navigate to the folder where your Excel files are stored.
  3. Set the sort order to "Date Modified" within File Explorer.
  4. Click on the "View" tab in the File Explorer menu.
  5. Click on "Options" on the right side of the ribbon.
  6. In the "Folder Options" window, go to the "View" tab.
  7. Click on "Apply to Folders" or "Reset Folders" to apply the view settings to all folders, including the one containing your Excel files.

    Method 2: Macros for Excel​

    If the above method doesn't work, you can try using macros in Excel to automate the sorting process within Excel itself. Here's a general outline of how you can set up a macro to sort files by date when opening them in Excel:
  8. Open Excel.
  9. Press Alt + F11 to open the Visual Basic for Applications (VBA) editor.
  10. Go to Insert -> Module to create a new module.
  11. Copy and paste the following VBA code into the module:
    Code:
    Sub SortFilesByDate() Application.FileDialog(msoFileDialogOpen).Show ActiveWorkbook.Sort.SortFields.Clear ActiveWorkbook.Sort.SortFields.Add2 Key:=Range("A1"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal ActiveWorkbook.Sort.SortFields.Add2 Key:=Range("B1"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal With ActiveWorkbook.Sort .SetRange Range("YourRange") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With End Sub
  12. Replace "YourRange" with the range that contains your data in the Excel file.
  13. Close the VBA editor and save your workbook with macros enabled (Excel Macro-Enabled Workbook).
  14. Now, every time you want to open a file in Excel and sort it by date, run this macro. By utilizing these methods, you should be able to maintain the desired sort order even when opening files in Excel. Let me know if you need any further assistance!
 


Solution
Back
Top