Search results

  1. P

    Create new instance with variables.

    Is it possible to code a VBA class that accepts variables when creating an object instance? e.g. Dim myClass as AClass = new AClass("aParm", "bParm")
  2. P

    Need help implementing property of base class in derived class.

    A property denotes a storage location to store a value. VBA OOP has decided to use the word "Property" as a qualifier but in reality they are Let and Get methods. The first block does not contain a property. It contains 2 methods to Let and Get a property called "FirstName" that has not been...
  3. P

    Need help implementing property of base class in derived class.

    OK... a class that defines an interface. And when that interface has a public property, that property must be identified in the implementation class. I'm asking how to code that. Your example shows how to code the methods. That I figured out yesterday. Are you suggesting that interfaces cannot...
  4. P

    Need help implementing property of base class in derived class.

    I solved my problem with the wrong the method being executed but I haven't figured out how to reference the property contained in the base class. Following the naming rule for derived methods, I tried coding Private clsBase_aProperty but I still get the same compile error.
  5. P

    Need help implementing property of base class in derived class.

    In my base class (clsBase) I have Public aProperty As String and the Let and Get skeleton property methods. In the derived class (clsDerived) I coded Implements clsBase. I coded the Let and Get property methods, prefixing them with clsBase_xxxx. That works great. I can't figure out how to...
  6. P

    Interface implementation not executing.

    Working as coded. My mistake was that I created an instance of the base class instead of creating an instance of the derived class. DUH. Case closed.:o
  7. P

    Interface implementation not executing.

    Sorry. That was a typo. I did use Let...not Set.
  8. P

    Interface implementation not executing.

    To play with writing an interface and implementation I wrote a simple example. The interface "clsSimple" has a field that I named pCustomerName and defined is as String. I created the Public Get and Set properties for CustomerName and wrote no code for them since they would be implemented in the...
Back
Top Bottom