how to use computed property's Set

I have currently a method, RandomRow, that sets (or returns) via a randomized calculation (it’s currently about 100 lines of code of calcuation) the row counter of one element of an array.
If I use this method instead as a computed property, I could return the calculation via the Get, and have the calculation in the Set.
Is this correct?
How do I SET RandomRow? Is it simply by having RandomRow return the row counter?

You seem to misunderstand what computed properties are. See this introduction to using them: Using Computed Properties and Method Assignment

No. I understand it only from one side and that is using it as a read-only property. From the explanations there, it is quite possible I could over-use a computed property. What is not really explained is how Set is fired. What is partially explained is the choice between putting the calculation in Get or Set. Can someone offer a fuller explanation?

I will take it from Dave’s like of your comment that I shouldn’t use it this way (and won’t) but I don’t understand the other 2 pieces I mentioned. Where (and why) the calculation goes and how to fire the Set?

That is explained in the link above.

A computed property that’s writable, also has a private property attached to it. If your computed property is named “myProperty” you should also have a private property called “mmyProperty”. When you use Set, you put the value in the private property. Get will read from it.

Thank You. The second property, mmyproperty, I understood to be the exact opposite, and I gathered that from the forum.

a simple example

Public Dim zCaption as String

Public Property myCaption as string
  Return zCaption
End Get

  if zCaption<>value then 
<..... do some other stuff if you want....>
  end if
End Set

End Property

caption is now handled like any other variable
Its value is actually stored in zCaption, but the rest of the application really doesn’t care… it simply refers to it as “myCaption”
The GET method returns the value [ s=myCaption for example]
The SET method assigns a value… in the example, it ONLY assigns it if the value has changed, and if so, then does “other stuff”

A computed property MUST always have a GET, the SET is optional (the backing data [zCaption in this case], could be controlled by other aspects of the application

A computed property cannot have “parameters”… (you could not create s=myCaption(3)… you would use methods for that syntax)

Computed Variables COULD be duplicated using regular methods

SUB myCaption(assigns newValue as String)
  if zCaption<>newValue then 
<..... do some other stuff if you want....>
  end if

FUNCTION myCaption As String
return zCaption