sub 窗体的ToggleButton_Click()dim YesNo as stringYesNo=userform1.ToggleButton1.valueif YesNo=true then msgbox("选中了")else msgbox("取消了选择")endifend sub