新手请问个控件的简单有关问题

新手请教个控件的简单问题Private Sub CheckBox1_Click()If CheckBox1.Value 1 ThenListBox1.Visible

新手请教个控件的简单问题
Private Sub CheckBox1_Click()
If CheckBox1.Value = 1 Then
ListBox1.Visible = True

Else
If CheckBox1.Value = 0 Then
ListBox1.Visible = False


End If
End If

End Sub
没搞过vb。。。
我这样写有错吗,office2007上提示对象没有属性,啥意思
[解决办法]
Private Sub CheckBox1_Click()
   If CheckBox1.Value = 1 Then
       ListBox1.Visible = True
   Else
       ListBox1.Visible = False
   End If

End Sub

就可以了
[解决办法]
可以简化为:
Private Sub CheckBox1_Click()
ListBox1.Visible = CheckBox1.Value 
End Sub