datagridview控件选中某行后触发事件的代码哪里有错,多谢各位

datagridview控件选中某行后触发事件的代码哪里有错,谢谢各位大虾Private Sub DataGridView1_CellValueCha

datagridview控件选中某行后触发事件的代码哪里有错,谢谢各位大虾
Private Sub DataGridView1_CellValueChanged(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
        selectedsheet = DataGridView1.CurrentCell.Value
        If selectedsheet Is Nothing Then
            Button3.Enabled = False
            Button4.Enabled = False
        Else
            Button3.Enabled = True
            Button4.Enabled = True
        End If
    End Sub

代码不对吧。