kwrl.net
当前位置:首页 >> VB程序制作一个成绩等级程序,要求在文本框TExt1中... >>

VB程序制作一个成绩等级程序,要求在文本框TExt1中...

Private Sub Command1_Click() If Text1.Text = "" Then MsgBox "请输入成绩", vbInformation, "提示" Text1.SetFocus Exit Sub End If If IsNumeric(Text1.Text) = False Then MsgBox "你输入的不是数字,请重新输入", vbInformation, "提示" T...

Private Sub Command1_Click() If Val(Text1.Text)

Private Sub Command1_Click() Dim s As Integer s = Val(Text1.Text) If s > 90 Then Print "优秀" ElseIf s > 80 And s 70 And s = 60 And s

Private Sub Form_Click() Dim n As Integer If IsNumeric(Text1.Text) Then n = Val(Text1.Text) Select Case n Case 0 Text2.Text = "Sunday" Case 1 Text2.Text = "Monday" Case 2 Text2.Text = "Tuesday" Case 3 Text2.Text = "Wednesday" C...

设文本框Text1 ,按钮Command1,代码如下: Private Sub Text1_Change()If IsNumeric(Text1) = False Then '如果不是数字 Command1按钮无效 Command1.Enabled = FalseElse '如果是数字 Command1按钮有效 Command1.Enabled = TrueEnd IfEnd Sub

Private Sub Command1_Click() Text2.Text = 0 Text3.Text = 0 Text4.Text = 0 For i = 1 To Len(Text1.Text) If Mid(Text1.Text, i, 1) Like "[A-Z]" Or Mid(Text1.Text, i, 1) Like "[a-z]" Then Text3.Text = Val(Text3.Text) + 1 ElseIf Mid...

用循环迭代一加,然后除以个数不就行了? 你没有说明平均成绩到底录入到哪里去了,是变量数组?数据库?还是什么,没法写代码。 好吧,假设成绩都存到了数组CJ里面, 另外假设你的按钮框Name属性为'求平均值',文本框Name属性为'平均成绩'。 把...

字符大小写转换程序,当文本框Text1中输入大写字母,在文本框Text2中同时显示其小写字母;当文本框Text1中输入小写字母,在文本框Text2中同时显示其大写字母;当输入其他字符,则原样输出。 建立两个文本框 Private Sub Form_Load() Text1.Text =...

Private Sub Command1_Click() Dim Plate As Integer Dim a(3) As Integer Randomize Plate = Val(Text1.Text) - 1 For i = 1 To 3 a(i) = Int(Rnd() * Plate + 1) Next Label1.Caption = a(1) Label2.Caption = a(2) Label3.Caption = a(3) End...

问题不完整哦。。。。。。。 Dim a()Private Sub Form_Click() Dim m As Integer, n As Integer m = Val(InputBox("请输入行数")) n = Val(InputBox("请输入列数")) ReDim a(m, n) Randomize Text1.Text = "" For i = 1 To m For j = 1 To n a(i...

网站首页 | 网站地图
All rights reserved Powered by www.kwrl.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com