请教如何向其他form传递自定义的类型的变量?

seeku 2003-05-15 05:29:20
我自定义了一个变量
Public Type MyType
f1 As Integer
f2 As Long
End Type

在一个form的公用过程中使用,希望用来传递,参数,并且用于返回设置
Private m_mt As MyType
Public Sub form4_proc(mt As MyType)
m_mt = mt
End Sub

编译的时候报错,大概意思就是我的type不是public的
错误原文:only public user defined types defined in public object modules
can be use as parameters or return types for public procedure of class modules or as fields of public user defined types
这么长嘎
...全文
78 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧