title: VBA Class Module - Setting default values
body: <p>I've only just started wrapping my head around building classes in Class Modules for VBA. It has been fairly smooth sailing so far, but I ran into a small challenge which is very easily solved if I were making a conventional function in a Module: How can I set an optional boolean default value to True?</p>
  
  <p>In a function or sub, I would simply solve this in the property list by implicit declaration: </p>
  
  <pre><code>Function SomeFunction(Optional bValue = True) as Variant
  ...
  End Function
  </code></pre>
  
  <p>In a Class Module using Let and Get properties, I haven't quite found my way around it yet since VBA defaultedly declares a Boolean variable as false. So I have, e.g.:</p>
  
  <pre><code>Private bValue as Boolean
  
  Public Property Let TrueOrFalse(myBoolProperty As Boolean)
      bValue = myBoolProperty
  End Property
  
  Private Property Get TrueOrFalse() As Boolean
      TrueOrFalse = bValue
  End Property
  
  Function SomeFunction() As Boolean
      SomeFunction = TrueOrFalse
  End Function
  </code></pre>
  
  <p>Bear in mind, I'm still learning, so even this simple code might be unsexy to the trained eye, but the question remains: How can I default bValue to True if I only want to use it as an Optional property?</p>
  
  <p>Hopefully that made some sense..</p>
  
  <p>Thank you for reading!</p>