1313.html

来自「以电子书的形式收集了VB一些常见问题解决方法,可以很方便的查找自己需要解决的问题」· HTML 代码 · 共 25 行

HTML
25
字号
<html>  <head>    <title>如何宣告自定形态变数为全域变数?</title>  </head>  <BODY BACKGROUND="" BGCOLOR="white" TEXT="black" LINK="blue" VLINK="#808080" ALINK="red">    <center>      <h1>如何宣告自定形态变数为全域变数?</h1>    </center><HR><p>Posted by <a href="mailto:lwg@ss20-1.tatung.com.tw">林文国</a> on November 18, 1997 at 03:35:53:<p>If I defined a user-defined type as<p>type ex_type<br>   varA as integer<br>   varB() as double<br>end type<p>Thus, we can define a variable C whose type is ex_type as <p>dim varC as ex_type<p>Now, my problem is how can I claim varC as a global variable. Assume there are one form and 3 modules in a project. They have filename as form.frm, a.bas, b.bas and c.bas, respectively. Each one<br>have some functions or procedures. My problem is that is it possible <br>that varC can be used in all form and modules?<br>I tried to define varC as global in a.bas, but it failed to be recognized in b.bas, c.bas and form,frm. That is to say, In a.bas, I define<p>golbal varC as ex_type<p>but b.bas can't recognie what is varC.varA.<p>Is it possible to define varC as a global variable?<br>Thank you very much....<br><p><a name="followups">Follow Ups:</a><br><ul><!--insert: 1313--><!--top: 1315--><li><a href="1315.html"><b>当然可以!</b></a> 小吴 <i>16:47:47 11/18/97</i>(<!--responses: 1315-->0)<ul><!--insert: 1315--></ul><!--end: 1315--></ul><!--end: 1313--><br><HR><p></body></html>

⌨️ 快捷键说明

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