Since you are working with an object you are going to have to go with a Property Get and a Property Set. Try something like this instead.VB Code:
Option Explicit Public Property Get Picture() As Picture Set Picture = UserControl.Picture End Property Public Property Set Picture(ByVal New_Picture As Picture) Set UserControl.Picture = New_Picture PropertyChanged "Picture" End Property Private Sub UserControl_ReadProperties(PropBag As PropertyBag) Set Picture = PropBag.ReadProperty("Picture", Nothing) End Sub Private Sub UserControl_WriteProperties(PropBag As PropertyBag) PropBag.WriteProperty "Picture", Picture, Nothing End Sub




Reply With Quote