Private Sub Command1_Click()
Dim hello As Variant
upbound = InputBox("enter avalue", "number", "")
lowbound = InputBox("enter avalue", "number", "4")
upbound = Val(upbound)
lowbound = Val(lowbound)
ReDim hello(1 To upbound, 1 To lowbound)
hello(1, 1) = zhangdegong
hello(1, 2) = man
hello(1, 3) = 24
hello(1, 4) = university
hello(1, 5) = hebei
hello(2, 1) = lidesheng
hello(2, 2) = man
hello(2, 3) = 30
hello(2, 4) = university
hello(2, 5) = beijin
hello(3, 1) = wanli
hello(3, 2) = woman
hello(3, 3) = 25
hello(3, 4) = "graduate student"
hello(3, 5) = hebei
If Text1.Text = zhangdegong Then
Text2.Text = hello(1, 1)
Text3.Text = hello(1, 2)
Text4.Text = hello(1, 3)
Text5.Text = hello(1, 4)
Else
If Text1.Text = lidesheng Then
Text2.Text = hello(2, 1)
Text3.Text = hello(2, 2)
Text4.Text = hello(2, 3)
Text5.Text = hello(2, 4)
Else
If Text1.Text = wanli Then
Text2.Text = hello(3, 1)
Text3.Text = hello(3, 2)
Text4.Text = hello(3, 3)
Text5.Text = hello(3, 4)
Else
msg1& = "no this man"
msg2& = "nis man"
r = MsgBox(msg1&, 34, msg2&)
Print r
End Sub
编译不通过,怎么办?
帮忙改下可以不?ZHRX?