[VB 6] Absolutely Baffled - Sovled

Started by
-1 comments, last by lemon 14 years, 11 months ago
for once, i am baffled as to why the second loop causes run-time error 91:

    For i = 1 To UBound(sNames)
    
        p.styls.add sNames(i), 0
        
        Debug.Print p.styls(sNames(i)).name, , p.styls(sNames(i)).value
        
    Next i
    
    For i = 1 To UBound(sNames)
    
        Debug.Print p.styls(sNames(i)).name, , p.styls(sNames(i)).value
        
    Next i
every new object instance is done so with the new keyword, every assignment uses the set keyword. i would rather not throw anything at a nice 19" LCD screen and go back to using my insanely slow laptop. --- well, i was about to post this without this following part. noob error (i have been having a lot recently... is that good or bad?): in the loop to figure out if the p.styls(sNames(i)) is a valid object, i used the maximum element count as part of the conditional, instead of the iterator variable. nUb r eYe

This topic is closed to new replies.

Advertisement