
If Text2.Text >(Text1.Text - 105) * 1.1 Then
Label3.Caption = "偏胖,注意节制"
ElseIf Text2.Text <(Text1.Text - 105) * 0.9 Then
Label3.Caption = "偏瘦,增加营养"
Else
Label3.Caption = "正常,继续保持"
End If
End Sub
Private Sub Text1_Change()
If Not IsNumeric(Text1.Text) Then
Text1.Text = ""
End If
End Sub
Private Sub Text2_Change()
If Not IsNumeric(Text1.Text) Then
Text1.Text = ""
End If
End Sub
我刚要回答,发现已经有人回答了,不过他的没有限制输入字符只能为数字...
我来补充下..哈哈
最多只能输入3个字符,我改的是
Text1.MaxLength = 3
Text2.MaxLength = 3
Private Sub Form_Load()
Me.AutoRedraw = True '让窗口可以输出字符
Me.Width = 12000 '让窗口足够宽以显示所有字符
For a = 1 To 9 '循环
For b = 1 To a
Print b "*" a "=" a * b ",", '输出 分号表示输出后不换行且下次输出紧靠在上次输出的后面
Next b
Print '换行
Next a
End Sub
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)