Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim table As New Data.DataTable table.Columns.Add("名前", GetType(String)) table.Columns.Add("英語", GetType(Integer)) table.Columns.Add("国語", GetType(Integer)) table.Columns.Add("数学", GetType(Integer)) table.Columns.Add("備考", GetType(String)) table.Rows.Add("徳川家康", 90, 85, 65, "aaa") table.Rows.Add("豊臣秀吉", 55, 85, 70, "") table.Rows.Add("織田信長", 82, 90, 85, "") table.Rows.Add("松永久秀", 80, 80, 80, "") DataGridView1.DataSource = table End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Me.DataGridView1.CurrentCell.Value = Nothing Then MsgBox("Nothingです。") Else MsgBox("Nothingではないです。") End If End Sub