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.

Reply via email to