⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8607.html

📁 VB技巧问答10000例 VB技巧问答10000例
💻 HTML
字号:
<html>
  <head>
    <title>Re: 有关字串及数字</title>
  </head>
  <body bgcolor="#FFFFFF" vlink="#808080">
    <center>
      <h1>Re: 有关字串及数字</h1>
    </center>
<hr size=7 width=75%>

<hr size=7 width=75%><p>
Posted by Someone on December 25, 1998 at 08:44:35:<p>
In Reply to: <a href="8602.html">有关字串及数字</a> posted by 仔仔 on December 24, 1998 at 21:24:35:<p>
: 我只是个初学者,以下有二个笨问题想问问各位高手,希望能为我解答,谢谢!<br>: 一、假如写了一个数学程式而一个运算式中应当不会出现字串,例如:Val (text1)=Val(text2)+Val(text3)中,其中text2和text3中应该填入一个数值,但是如果填入者为一字串时,程式会因发生错误而关闭,我想在这时蹦现出一个msgbox以跳过这种错误发生避免程式的关闭时,我该怎么写这段程式呢?<p>A:<br>分别在Text2与Text3的KeyPress事件下加入<br>If Not (Chr(KeyAscii) Like "[0-9.]") Then<br>    MsgBox "此栏只允许输入数字与小数点。", vbCritical, "输入错误"<br>    KeyAscii = 0 '此行加入KeyAscii = 0可让非数字按键不显示出来<br>End If<br>
<br>
<br><hr size=7 width=75%><p>
<a name="followups">Follow Ups:</a><br>
<ul><!--insert: 8607-->
<!--top: 8614--><li><a href="8614.html">Re:Re: 有关字串及数字</a> <b>仔仔</b> <i>19:01:34 12/25/98</i>
(<!--responses: 8614-->2)
<ul><!--insert: 8614-->
<!--top: 8685--><li><a href="8685.html">Image 闪动问题无解</a> <b>小吴</b> <i>15:46:03 12/29/98</i>
(<!--responses: 8685-->1)
<ul><!--insert: 8685-->
<!--top: 8702--><li><a href="8702.html">Re: Image 闪动问题无解</a> <b>仔仔</b> <i>21:27:35 12/29/98</i>
(<!--responses: 8702-->0)
<ul><!--insert: 8702-->
</ul><!--end: 8702-->
</ul><!--end: 8685-->
</ul><!--end: 8614-->
</ul><!--end: 8607-->
<br><hr size=7 width=75%><p>

</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -