按照建议的思路,在一个combo控件里编写了以下语句,怎么把这个X赋值给其它窗体来用啊?
Private Sub combo1_Change(Index As Integer)
x = 0
If combo1.Text = "4" Then
x = x + 4
ElseIf combo1.Text = "8" Then
x = x + 8
ElseIf combo1.Text = "16" Then
x = x + 16
ElseIf combo1.Text = "32" Then
x = x + 32
ElseIf combo1.Text = "64" Then
x = x + 64
ElseIf combo1.Text = "0" Then
x = x + 0
Else: x = x + 0
End If
x = x + 1
MsgBox x
End Sub
[此贴子已经被作者于2021-8-19 13:36编辑过]