Be sure to requery. Here is an example doing the same thing using the current directory (look at the form's init):
oform=CREATEOBJECT('testform')
oform.show()
READ EVENTS
RETURN
DEFINE CLASS testform AS form
DoCreate = .T.
Caption = "Listbox Displaying all .xls files in current directory"
Name = "Form1"
DIMENSION myarray[1,5]
ADD OBJECT list1 AS listbox WITH ;
RowSourceType = 5, ;
RowSource = "thisform.myarray", ;
Height = 170, ;
Left = 24, ;
Top = 36, ;
Width = 300, ;
Name = "List1"
PROCEDURE Init
=adir(thisform.myarray,"*.xls")
DODEFAULT()
thisform.list1.requery()
ENDPROC
PROCEDURE UNLOAD
DODEFAULT()
CLEAR EVENTS
ENDPROC
ENDDEFINE
>Okay,
>
>For some reason this is getting to me and I can't figure it out. I have a array property on a form myarray[1,5]. I then want to do something like this
>=adir(thisform.myarray,"*.xls"). Works Fine.. however i have a list box bound to thisform.myarray and it will only display the first element.
>
>
>Thanks in advance,
>
>Paul
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"