>>>I know there are workarounds (I will try GetPEM() immediately), but I was just wondering why ReadExpression() doesn't seem to work as advertised.
>>
>>I think the purpose of ReadExpression() was primarily to help writing wizards and builders, i.e. design-time stuff.
>
>Well, that is exactly what I wanted to do. Automate some design-time stuff. As you stated in a previous reply, I want to insert a column. I want to do this at design-time.
>
>Anyway, I think I have solved this already.
>
>I still have a slight problem: when storing a property with WriteExpression(), it prepends an "=" for logical and numeric values. For instance, when copying property .ReadOnly, from another column, the value becomes
=.T.. I don't think this is a serious problem, though.
I think the = prefix stands for "evaluate this", i.e. "the PEM value may contain expression depending on other stuff", which means that it can't be taken for granted, and the value will be applied after instantiation of the control, not before it. Most of the time this doesn't make any difference, specially as you actually have a constant there. The "=" is a must if you're including an expression which needs to be recalculated, like, say, a string which evaluates to a controlsource, or a function call.