請教高手下列程式是否有誤,或者作法有誤。
in class1
'
Private mstrField50 As String
Public Property Get Field50() As Variant
Field50 = mstrField50
End Property
'
Public Property Let Field50(ByVal strChinese As Variant)
mstrField50 = strChinese
End Property
'
'
in form1
'
Private Sub Command5_Click()
Dim objClass As New Class1
objClass.Field50 = txtField(0)
Set objClass = Nothing
End Sub
'
'
in form2
'
'
Private Sub Command3_Click()
Dim objClass As New Class1
Me.txtField(0).Text = objClass.Field50
Debug.Print objClass.Field50 <================無法得到任到資料
End Sub
'
'
think you