代码
Public strCustomerID As String
Public Property CustomerID() As String
Get
CustomerID = strCustomerID
End Get
Set(ByVal Value As String)
strCustomerID = Value
End Set
End Property
'''''''''''
'用对话模式打开每一个窗体,窗体之间传值可以写属性,如:
'建立CustomerID属性,来供调用的程序指定客户编号(CustomerID为私有变量)
'本窗体名:frmSelect
Public Property CustomerID() As String
Get
CustomerID = strCustomerID
End Get
Set(ByVal Value As String)
strCustomerID = Value
End Set
End Property
'传值时用下列方法:
Dim objFrmSelect As New frmSelect
objFrmSelect.CustomerID = '"您的具体值"
'需要接受传值的窗体都写上属性