R
R Avery
I have several forms that I use a lot, and want a simple, clean
interface to access/populate them. What I have done is create a class
that encapsulates the form, and provides only the properties and events
necessary for using the form. However, this was before I found out that
VBA supports interfaces. Would it make more sense to just have an
interface and implement all of the interface code in the form itself, or
continue with the approach I actually used?
If so, one question I would have, would i have to alter my code in the
form to raise the interface's events? For example, button clicks? I am
unlikely to reuse the interface for any other form or class.
Or, is there a better implementation than this?
Any help would be appreciated.
interface to access/populate them. What I have done is create a class
that encapsulates the form, and provides only the properties and events
necessary for using the form. However, this was before I found out that
VBA supports interfaces. Would it make more sense to just have an
interface and implement all of the interface code in the form itself, or
continue with the approach I actually used?
If so, one question I would have, would i have to alter my code in the
form to raise the interface's events? For example, button clicks? I am
unlikely to reuse the interface for any other form or class.
Or, is there a better implementation than this?
Any help would be appreciated.