atw: Re: [mvpanz] Urgent help needed: VBA using Datatypes as Property returns

Twas me being stupid. Recursively calling the property itself whilst
performing property validation external to the object, so it was being
overwritten by the active version of the property I was still executing
within. 

________________________________

From: ME


Eg:

Get MyProperty() as MyDataType
...

Let MyProperty() as MyDataType

To form it, I create it temp datatype variables and stuff their values in.
Cool, I can set it.

Then I can read it, eg ? MyObject.MyProperty.MySubType works ok.

I can't write it back that way though

MyObject.MyProperty.MySubType = NewValue fails to actually write it back

My immediate workaround will be to set up another temp datatype variable,
set it to the object's property, alter it, and write it back. I am guessing
this is probably not me doing something stupid, but is a known feature. I
was trying to save some time instead of having to create yetanotherobject.

Any advice much appreciated.

**************************************************
To post a message to austechwriter, send the message to 
austechwriter@xxxxxxxxxxxxxx

To subscribe to austechwriter, send a message to 
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with 
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to 
www.freelists.org/archives/austechwriter

To contact the list administrator, send a message to 
austechwriter-admins@xxxxxxxxxxxxx
**************************************************

Other related posts: