崂山沙子口规划2017:编程傻瓜问题

来源:百度文库 编辑:神马品牌网 时间:2024/04/29 16:14:30
Private Sub ChkBold_Click()
If ChkBold.Value = 1 Then
TxtContent.FrontBold = True
Else
TxtContent.FontBold = False
End If
End Sub
这代码有错误吗,为什么无法运行

Private Sub ChkBold_Click()
If ChkBold.Value = 1 Then
TxtContent.FrontBold = True '你这里写错了一个属性 应该是fontBold
Else
TxtContent.FontBold = False
End If
End Sub

要Font.Bold

Private Sub ChkBold_Click()
If ChkBold.Value = 1 Then
TxtContent.Font.Bold = True
Else
TxtContent.Font.Bold = False
End If
End Sub
这代码有错误吗,为什么无法运行

ChkBold.Value = 1 =FALSE
或这 ChkBold是控件,你把代码写到了它的CLOCK事件中,又复制了ChkBold它变成了控件数组,会出现错误