''' <summary> ''' CSVを入力します。 ''' </summary> ''' <param name="FileName_str">ファイル名</param> ''' <param name="Object_To">処理対象のコントロール</param> Private Sub Input_CSV(ByVal FileName_str As String, ByVal Object_To As System.Object) 'CSV入力 Try Dim Reader As IO.StreamReader Dim csvstr As String = String.Empty Reader = New IO.StreamReader(FileName_str, System.Text.Encoding.GetEncoding("shift_jis")) csvstr = Reader.ReadLine() Do Until csvstr Is Nothing Dim str() As String str = Split(csvstr, ",") Dim Array As String() = {str(0), str(1)} Object_To.Items.Add(New ListViewItem(Array)) csvstr = Reader.ReadLine() Loop Reader.Close() End Sub '以下呼び出し部分 Call Input_CSV (FileName , ListView1)