Sie Ste

Sie Ste

  • NA
  • 196
  • 184.5k

vb.net 2010 combo box

Jun 10 2015 11:46 AM

 In a VB.NET 2010 desktop application, I am using the following new logic to load values into a combo box.

Public dirAccessFiles As String() = Directory.GetFiles("H:\FilesTest", "*.accdb")
 Try
            Dim dir As String

            For Each dir In dirAccessFiles
                cboAccessFile.Items.Add(Path.GetFileNameWithoutExtension(dir))
            Next
        Catch except As Exception
            Console.WriteLine("The process failed: {0}", e.ToString())
        End Try

The user wants the file names to be in descending order in the combo box. Thus, can you tell me how to modify the code list above and/or would you show me code on how I can load file names into the combo box in descending order?

Answers (1)