# 如何宣告自定形态变数为全域变数?

Posted by 林文国 on November 18, 1997 at 03:35:53:

If I defined a user-defined type as

type ex_type
varA as integer
varB() as double
end type

Thus, we can define a variable C whose type is ex_type as

dim varC as ex_type

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
have some functions or procedures. My problem is that is it possible
that varC can be used in all form and modules?
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

golbal varC as ex_type

but b.bas can't recognie what is varC.varA.

Is it possible to define varC as a global variable?
Thank you very much....

Follow Ups:

- 当然可以! 小吴 16:47:47 11/18/97 (0)