dim i as integer,sum as double
dim a(1 to 20) as double '假设20个学生
sum=0
for i =1 to 20
a(i)=inputbox("请输入成绩")
sum=sum+a(i)
next i
for i =1 to 20
if a(i)> sum/20 then text1=text1& a(i) &" "
next i
Private Sub Command1_Click()
if trim(text1text) <> "" then text2text= val(text1text) 9 / 5 +32
End Sub
combo的style选2,然后输入以下代码:
Dim Money As Integer
Private Sub Combo1_Click()
C
End Sub
Private Sub Combo2_Click()
C
End Sub
Private Sub Form_Load()
With Combo1
AddItem "A"
AddItem "B"
AddItem "C"
AddItem "D"
Text = "A"
End With
With Combo2
AddItem "海运"
AddItem "陆运"
Text = "海运"
End With
C
End Sub
Private Sub C()
Select Case Combo1Text
Case "A"
Money = 1
Case "B"
Money = 2
Case "C"
Money = 3
Case "D"
Money = 5
End Select
If Combo2Text = "海运" Then
Money = Money + 10
Else
Money = Money + 100
End If
Text1Text = Money & "块钱"
End Sub
Private Sub Command1_Click()
Dim r As Single, y As Integer
r = 13
Do While r <= 20
r = r 101
y = y + 1
Loop
Print "我国现有人口13亿,年增长率为1%," & y & "年后增加到20亿"
End Sub
以上就是关于一个vb简单小程序全部的内容,包括:一个vb简单小程序、VB的一个小程序 求大神解答、VB编写一个自动运算的小程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)