If it works do not change it, always says my teacher. ;)
Maybe I can suggest another way to get that, but only for discussion. This has not been tested:
Public Class Form1
'
' Do you really want to have only 5 files?
' I will suggest to work with FileInfo instead, because you can have more control on what is happening with the file
'
' Dim strFile() As FileInfo ' But really we need no array
Const strPath As String = "C:\Definition Data" ' declaring as a constant will not waste time nor memory on each new assignement
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' strPath = "C:\Definition Data\"
' Dim i As Integer
' Dim strFile(5) As String
' For i = 0 To 3
' I will suggest to change this in a for each loop
For each existingFile as FileInfo in My.Computer.FileSystem.GetFiles(strPath)
' strFileName(i) = strFile(i).Remove(0, strFile(i).LastIndexOf("\"))
' cmbDefnTerms.Items.Add(strFileName(i))
' add it directly as object in the combo.
' The file names will be OK as the default ToString for a FileInfo
' obtained using GetFiles is the file name, not the full path
cmbDefnTerms.Items.Add(existingFile)
Next
End Sub
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbDefnTerms.SelectedIndexChanged
' strPath = "C:\Definition Data"
Dim FiletoShow as FileInfo = Ctype(cmbDefnTerms.SelectedItem, FileInfo) ' this will retrieve the selecte Item
If Filetoshow.Exists then ' you will verify that the file exists before showing it
try
txtDefinition.Text = …