用户定义类型不在模块中存储数据

时间:2015-02-21 16:10:53

标签: vb6

我不确定我是否做错了什么,我有一个UDT,我在一个程序中填充数据但我无法在下一个程序中检索该数据。

Private Type APP
    name As String
    version As String
End Type

Private Sub Form_load()
    Call Process1
    Call Process2
End Sub

Private Sub Process1
    Dim data As APP

    data.name = "MyApp"
    data.version = "1"
End Sub

Private Sub Process2
    Dim data As APP

    Debug.Print "Name: "; data.name
    Debug.Print "Version: "; data.version
End Sub

0 个答案:

没有答案