axnst2
asked on
Defult value of an object
I am trying to set a default value for "sheet" below. Meaning if it hasn't been set to anything yet then return 0 by default. How do I do that?
private mSheet as long
Public Property Get Sheet() As Long
Sheet = mSheet
End Property
Thanks,
axnst1
private mSheet as long
Public Property Get Sheet() As Long
Sheet = mSheet
End Property
Thanks,
axnst1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Get is a read only property. Do you want to write to "Sheet" ?
or any other Value you want.
Const mSheet = 1
Public Property Get Sheet() As Long
Sheet = mSheet
End Property
Private Sub Form_Load()
Caption = Me.Sheet
End Sub