# Re: 这种公用变数该如何读取？

Posted by 四眼蟾蜍 on July 12, 1999 at 19:57:59:

In Reply to: 这种公用变数该如何读取？ posted by 新人 on July 02, 1999 at 14:45:55:

让你久等了!!
VB 小技巧大秘密:在你的Form1程式中使用Property

程式 Sample:

Dim mvarWONo As String '工单单号

Public Property Get WoNo() As String
WoNo = mvarWONo
End Property

Public Property Let WoNo(ByVal vNewValue As String)

mvarWONo = vNewValue
Text1.Text = vNewValue

End If
End Property

程式执行 Sample:
Form1.WoNo = "A98011103"

Follow Ups: