# Change Cell Value

**URL:** <https://forum.xojo.com/t/change-cell-value/70076>\
**Category:** Getting Started\
**Created:** [May 4, 2022, 11:38am UTC](https://forum.xojo.com/t/change-cell-value/70076 "2022-05-04T11:38:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sebastien\_REMY](https://forum.xojo.com/user_avatar/forum.xojo.com/sebastien_remy/32/1946_2.png) [@Sebastien\_REMY](https://forum.xojo.com/u/Sebastien_REMY)\
**Post date:** [May 4, 2022, 11:38am UTC](https://forum.xojo.com/t/change-cell-value/70076/1 "2022-05-04T11:38:43Z")

</div>

How can I change a cell value in this code

```auto
For Each row As DesktopListBoxRow in MyList.Rows
  
  // Refreh Chrono
  Var t As Integer = row.Tag
  
  // Put t value on Column 3
 row.columnAt(3) = t.ToString // I need help for this line of code
  
Next

```

---

<div class="post-metadata">

**Author:** ![Emile\_Schwarz](https://forum.xojo.com/letter_avatar_proxy/v4/letter/e/90ced4/32.png) [@Emile\_Schwarz](https://forum.xojo.com/u/Emile_Schwarz)\
**Post date:** [May 4, 2022, 12:06pm UTC](https://forum.xojo.com/t/change-cell-value/70076/2 "2022-05-04T12:06:25Z")

</div>

> [@Sebastien\_REMY](#):
>
> `columnAt`

Where do you found ColumnAt ?

What do you want to do ?  
(place 3 in the whole column ?)

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [May 4, 2022, 1:08pm UTC](https://forum.xojo.com/t/change-cell-value/70076/3 "2022-05-04T13:08:40Z")

</div>

This should get you started on the right path.

```auto
var max as Integer = MyList.LastRowIndex
for index as Integer = 0 to max
  MyList.CellTextAt( index, 3 ) = MyList.RowTagAt( index )
next index

```

---

<div class="post-metadata">

**Author:** ![Sebastien\_REMY](https://forum.xojo.com/user_avatar/forum.xojo.com/sebastien_remy/32/1946_2.png) [@Sebastien\_REMY](https://forum.xojo.com/u/Sebastien_REMY)\
**Post date:** [May 4, 2022, 1:24pm UTC](https://forum.xojo.com/t/change-cell-value/70076/4 "2022-05-04T13:24:42Z")

</div>

This what I have adopted but the loop is not elegant as for each

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [May 4, 2022, 1:27pm UTC](https://forum.xojo.com/t/change-cell-value/70076/5 "2022-05-04T13:27:05Z")

</div>

Unfortunately you can’t set CellTextAt on DesktopListBoxRow. If you could, this would be easier:

```auto
For Each row As DesktopListBoxRow in MyList.Rows
  row.CellTextAt(3) = row.Tag.IntegerValue.ToString
Next

```

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [May 4, 2022, 1:34pm UTC](https://forum.xojo.com/t/change-cell-value/70076/6 "2022-05-04T13:34:46Z")

</div>

Feature request perhaps? It makes sense to have

```auto
row.CellTextAt(column As Integer) As String

```

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [May 4, 2022, 1:35pm UTC](https://forum.xojo.com/t/change-cell-value/70076/7 "2022-05-04T13:35:31Z")

</div>

Certainly. I’m guessing they didn’t do it previously because they’d need to implement an observer. Shouldn’t be a problem.

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [May 4, 2022, 2:12pm UTC](https://forum.xojo.com/t/change-cell-value/70076/8 "2022-05-04T14:12:43Z")

</div>

\<[https://xojo.com/issue/68493](https://xojo.com/issue/68493)\>
