VB 语法错误

来源:百度知道 编辑:UC知道 时间:2024/06/21 11:36:11
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.Font.Italic = ture
Elself Check1.Value = 0 then
Text1.Font.Italic = False
End If
End Sub

Private Sub Check2_Click()
If Check1.Value = 1 Then
Text1.Font.Bold = True
Elself Check2.Value = 0
tex1.Font.Bold = False
End If
End Sub

请大家帮忙....哪错了 我自学的 看教材上写的 会哪里错?

大哥你看的什么破书全是错误。这个是我调试好的。你可以试下:
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.Font.Italic = True
ElseIf Check1.Value = 0 Then
Text1.Font.Italic = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.Font.Bold = True
ElseIf Check2.Value = 0 Then
Text1.Font.Bold = False
End If
End Sub

Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.Font.Italic = ture
ElseIf Check1.Value = 0 Then
Text1.Font.Italic = False
End If
End Sub

Private Sub Check2_Click()
If Check2.Value = 1 Then
Text1.Font.Bold = True
ElseIf Check2.Value = 0 Then
Text1.Font.Bold = False
End If
End Sub

字体斜不了的 晕

楼上的苍雪答案是对的
原程序第3行 ture-----true
第4行 else1f---elseif
倒数第4行 check1---check2 else1f----elseif 这行还少了个then
倒数第6行 check1---check2
把楼上的答案复制到VB里就可以用了。

我说楼主,你写的太复杂了,其实不用那么