I'm currently trying to add whatever files that exist in the directory into a combo box.
Dim dir = "C:\Users\jason\Desktop\SystemFiles"
For Each file As String In System.IO.Directory.GetFiles(dir)
cmbTemplateFiles.Items.Add(System.IO.Path.GetFileNameWithoutExtension(file))
Next
When executing this program, it says The given path's format is not supported
- Do I have to add new header files?
- Is there anything wrong with my coding?