First question - is there any other code or setup in the program regarding the File control? There isn't a built-in one in NSbasic - you need to do an AddObject line or something similar.
Also, if you're not going to do any more error checking, then you should probably add an 'On Error Goto 0' line after the End If in Init - otherwise there could be a cascade of error conditions and no notifications about them at all. Hope that this helps. --- In [email protected], "georgeewalters" <gwalt...@...> wrote: > > Newbee (old returning) trying to load a list box when initing the program. > > Sub Form1_Load > > Description.UppercaseOnly = True > Description2.UppercaseOnly = True > ItemNbr.SetFocus > Keyboardstatus = 1 > Init > > End Sub > > Sub Init > > On Error Resume Next > file.Open "\My Documents\pdaPickList.txt",4,1,3,118 'input, direct, > locked, reclen > If err.number > 0 Then > MsgBox("Can't open pdaPickList") > On Error Goto 0 > Exit Sub > End If > file.Get fileRec, 1 > > '-- build list box text > tmp = left(fileRec(1,6) & space(7),7) > tmp = tmp & left(ucase(fileRec(7,25)) & space(25),25) > > > ListBox1.AddItem tmp > > End Sub > > Problem is that there is nothing in the list box. What am I doing wrong? > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
