On 2006-08-02, at 11:54 PM, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote:

Hi there.

I have no idea what I'm doing wrong.

this should be so simple. All I want to do is add a string to a listbox cell.

I have 5 column, and I want to put the information into cell 0,0... yet I always get an out of bounds
error.

Help?

Sub Action()
  'when this button is pushed, add a field to a cell

  listbox1.addrow " "
  listbox1.Cell (0,0) = "bill"
  listbox1.ColumnCount = 5

End Sub




You have to set column count in the Listbox open event or in the property pane


in your pushbutton:

Listbox1.addrow ""
Listbox1.cell(Listbox1.LastIndex,0) = "This is col 1")
Listbox1.cell(Listbox1.LastIndex,1) = "This is col 2")
Listbox1.cell(Listbox1.LastIndex,2) = "This is col 3")
Listbox1.cell(Listbox1.LastIndex,3) = "This is col 4")
.....



Sven E




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to