You cannot write to an attribute which is using a Data Reference. It's possible only with the PI Point Data Reference, if you set ReadOnly=False.
What are you trying to achieve?
If you first remove the data reference, you'll be able to write a value to this attribute. But, of course - you'll lose the lookup functionality.
I'm afraid, it is not possible to update value from Excel using macro to the Table Lookup Data Reference attribute.
An attribute configured as Table LookUp Data Reference does not support UpdateValue(s) calls. See the following for a reference of which data methods are supported based on the data reference configuration:
Thanks for your reply. Our customer has a very tag-conscious environment and they were reluctant to consume any tags for this particular exercise, which was to record some sample lab data at a frequency of about 20 entries per month, which isn't much. Hence, I was trying to figure a way to write to an attribute which would in turn update a table, without consuming a tag.
Anyway, back to topic, I have devised a workaround now. I wrote a macro which will write into a SQL table. The SQL table is then linked to an AF Table which updates when a new entry is found. Now I can build some attributes linked to the table and references the table data.
Yes, that's the normal way of doing things.
If you'd explained your mission in your first post you would have been adviced to do so. That's why it's always a good idea to write some background stuff on your problem, not just the technical bit where you're stuck But hey, it worked out in the end!