Private Sub lstFileName_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstFileName.SelectedIndexChanged Dim FullPath As String ''確認用のソース 'If lstFileName.SelectedIndex < 0 Then ' Console.WriteLine("未選択状態です。") ' Exit Sub 'End If '未選択状態なら処理を抜ける If lstFileName.SelectedIndex < 0 Then Exit Sub FullPath = FullPaths(lstFileName.SelectedIndex) WebBrowser1.Navigate(FullPath) Me.Text = Application.ProductName & " - " & FullPath End Sub