这个我试过了,可以赋值但是check的状态不会改变?该怎么办呢?option 就没有这个问题!

解决方案 »

  1.   

    check.setfocus
      sendkeys "{entry}",true
      

  2.   

    '把窗体的KeyPreview设为True,按"A"键切换
    '另外当CheckBox控件获得焦点时,window下默认得切换键是空格键
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
      If KeyCode = vbKeyA Then
        Check1.Value = 1 - Check1.Value
        Option1.Value = Not Option1.Value
      End If
    End Sub
      

  3.   

    调用对象的keydown的函数,keycode来判断你需要输入的键盘信号,在程序中
    这样写:判断完键盘的键值后
    if check1.value=ture then
    check1.value=false
    else
    check1.value=ture
    end if
      

  4.   

    Windows中“+”号可以给复选框打上钩,“-” 则去掉,