一个vb编程题,求大神提供编程~谢谢谢谢急急急

2026年09月13日 19:02
有2个网友回答
网友(1):

啥时候要。。。。。。。。

网友(2):

非空判断我就不写了,你自己加上
Private Sub Command1_Click()
Dim str, sex, nation As String
str = ""
sex = ""
nation = ""
If Check1.Value = 1 And Check2.Value = 1 Then
str = str & Check1.Caption & "、" & Check2.Caption
Else
If Check1.Value = 1 And Check2.Value = 0 Then
str = str & Check1.Caption
Else
If Check2.Value = 1 And Check1.Value = 0 Then
str = str & Check2.Caption
Else
str = "空"
End If
End If
End If
If Option1.Value = True Then
sex = Option1.Caption
Else
sex = Option2.Caption
End If
If Option3.Value = True Then
nation = Option3.Caption
Else
nation = Option4.Caption
End If
MsgBox Text1(0).Text & Chr(13) & "性别:" & sex & Chr(13) & "民族:" & nation & Chr(13) & "荣誉:" & str & Chr(13) & "面试成绩:" & Text1(1).Text
End Sub

Private Sub HScroll1_Change()
Text1(1).Text = HScroll1.Value
End Sub

Private Sub Option1_Click()
If Option1.Value = True Then
Option2.Value = False
End If
End Sub

Private Sub Option2_Click()
If Option2.Value = True Then
Option1.Value = False
End If
End Sub

Private Sub Option3_Click()
If Option3.Value = True Then
Option4.Value = False
End If
End Sub

Private Sub Option4_Click()
If Option4.Value = True Then
Option3.Value = False
End If
End Sub