D
Doug Glancy
With help from Bullen, Green, Bovey and Rosenberg, I've created the
following class module. It does what I want, i.e., allows me to read and
write the "face up" property of "cards", which are images on a userform.
However, I had to use 3 different variations on "face up" to get it to
work - the property, "face_up," the Let variable "fac_up" and the variable
to pass the state to the Get property, "fac3_up."
Is there a way to do it with one variable instead of two?
Option Explicit
Public WithEvents card As MSForms.Image
Private fac3_up As Boolean
Private Sub Card_Click()
Property Let face_up(fac_up As Boolean)
If fac_up = True Then
card.Picture = ConcentrationForm.birds.Controls("birds1").Picture
fac3_up = True
Else
card.Picture = ConcentrationForm.birds.Controls("birdsback").Picture
fac3_up = False
End If
End Property
Property Get face_up() As Boolean
face_up = fac3_up
End Property
End Sub
Thanks,
Doug Glancy
following class module. It does what I want, i.e., allows me to read and
write the "face up" property of "cards", which are images on a userform.
However, I had to use 3 different variations on "face up" to get it to
work - the property, "face_up," the Let variable "fac_up" and the variable
to pass the state to the Get property, "fac3_up."
Is there a way to do it with one variable instead of two?
Option Explicit
Public WithEvents card As MSForms.Image
Private fac3_up As Boolean
Private Sub Card_Click()
Property Let face_up(fac_up As Boolean)
If fac_up = True Then
card.Picture = ConcentrationForm.birds.Controls("birds1").Picture
fac3_up = True
Else
card.Picture = ConcentrationForm.birds.Controls("birdsback").Picture
fac3_up = False
End If
End Property
Property Get face_up() As Boolean
face_up = fac3_up
End Property
End Sub
Thanks,
Doug Glancy