× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

VBA Complicated Getter, Setter syntax

Steven Doggart
Jul 01, 2015
<p>You are reading the documentation for VB.NET. That's why you are confused. The syntax for properties in VBA is different. In VBA, the <code>Get</code> and <code>Let</code> for a property are not grouped together. They need to be listed separately, essentially like two separate methods:</p> <pre><code>Private mMyProperty As String Public Property Get MyProperty() As String MyProperty = mMyProperty End Property Public Property Let Transition(Value As String) mMyProperty = Value End Property </code></pre> <p>For VBA reference material, try starting <a href="https://msdn.microsoft.com/en-us/library/office/gg264383.aspx" rel="nofollow">here</a>.</p> <p>This tip was originally posted on <a href="http://stackoverflow.com/questions/29257127/VBA%20Complicated%20Getter,%20Setter%20syntax/29257418">Stack Overflow</a>.</p>
comments powered by Disqus