From the MSDN library:
"The parameters for Property Get, Property Let, and Property Set procedures
for the same property must match exactly, except that the Property Let has
one extra parameter, whose type must match the return type of the
corresponding Property Get, and the Property Set has one more parameter than
the corresponding Property Get, whose type is either Variant, Object, a
class name, or an object library type specified in an object library."
If you want the user to be able to format the return value from "Get
StreetAddress", why not just make the Formatted function public, so instead
....the user could type
Guide Konsult AB
"Douglas" <post.to.the.groupso.everyone.can.learn.com.au> wrote in message
news:40711411$0$27646$61ce578dnews.syd.swiftdsl.c om.au...fields> Gday :)
> I have a DLL project which calls data via ADO and exposes the variousinvalid> as Property(s).
> I'm getting a comile error:
> Compile Error:
> Definitions of property procedures for the same property are inconsistent,
> or property procedure has an optional parameter, a ParamArray, or anan> Set final parameter.
> Private pvStreetAddress As Variant 'internal value
> Property Let StreetAddress(TheValue As Variant)
> pvStreetAddress = TheValue
> End Property
> Property Get StreetAddress(ReturnAs As OutputFormat) As Variant
> If Not IsNull(pvStreetAddress) And pvStreetAddress Is Not Empty Then
> StreetAddress = pvStreetAddress
> StreetAddress = Formatted(rstAddresses("StreetAddress"), ReturnAs)
> End If
> End Property
> 'Formatted' is a custom function that outputs the result in the desired
> 'OutputFormat' is a Public Enum
> I'd like to allow the StreetAddress to be read (as from the DB), AND allow
> to be modified before issuing an 'Addresses.Save' call (which encapsulates
> ADO.Recordset.Update). I am hoping to substantially reduce the (ASP)
> interface maintenance aspect of this project by implementing a better OO
> This DLL (and several(!) more like it) will end up being a middle tier inVB> ASP environment.
> "Bob Butler" <tiredofitnospam.com> wrote in message
> news:%23V9HOwlGEHA.1272TK2MSFTNGP12.phx.gbl...> > "Douglas" <johncitizen.com> wrote in message news:40705d5dsl-news.> >> > > Gday,
> > >
> > > Is there a preferred newsgroup for the discussion of Class Modules ?
> > This is probably as good a place as any
> >> >> > > Additionally, is there a 'ten commandments of Class Modules' floating
> > > about ?
> > not that I know of... classes are probably the best improvement made to> about> > since they added database connections. Do you have specific questions>> > them?
> > --
> > Reply to the group so all can participate
> > VB.Net... just say "No"