ListBox CellTags and Booleans

I’m trying to use some simplified code when dealing with cellclicks within a listbox. I know that the CellTag is a variant and the autocomplete identifies it as such so that:

Me.CellTag(row, column).BooleanValue

Is recognized as correct. However, when I use the following to switch cells on and off:

Me.CellTag(row, Column).BooleanValue = Not Me.CellTag(row, column).BooleanValue

I get a compiler error - “Cannot assign a property to this value”.

Is it me or Xojo?

You can read the Variant’s convenience properties, but you write to the variant itself.

me.CellTag(r, c) = not me.CellTag(r, c).BooleanValue

I recognized that after I went offline last night :S

Oddity - how was that selected as a answer when I didn’t do it? Yes, it IS the answer, but since I’m the OP, should the choice of an answer be mine???

Yes, I think only the OP and mods can mark a post as answer.

Ok Kem, what kind of RegEx did you do to mark it answered? :stuck_out_tongue:

<<-- Plausible deniability