The crap is just another form of spam, created much like email spam. Have you DIMensioned that ItemNbr within a local scope (Sub or Function)? That's one way you can have two variables of the same name.
Aside from that the only thing I can guess is that the AddObject method (which is how your Textbox gets created, even if "painted" via the form designer) works by adding things to the global namespace of the script. The underlying script engine that executes your code probably won't see this as a name conflict when you add a new item at the module level. Even then I can't explain the results you're seeing though. I'd expect your non-Textbox declaration to override the global. Can you create a very tiny example that exhibits the same error? --- In [email protected], "georgeewalters" <gwalt...@...> wrote: > > Being new to NS and never having used VB I'm slowly learning to understand > the messages that get kicked out. But this one, or lack of one, is quite > confusing not to mention and very time consuming in finding the bug. I have > the following in a program (leaving out some interveining code). > > Dim ItemNbr,..... > .... > ItemNbr = 1 > .... > > MsgBox ItemNbr '<_ compiler complains here > > The compiler complains "Object doesn't support this property or method" on > the MsgBox line. After hours of thought and attempts to discover the problem > I find that "ItemNbr" is also the name of a text box. I would have thought > that the compiler should have complained about the "DIM ItemNbr" with a > message like "attempt to redefine ItemNbr", but it did not and also did not > complain about the assignment statement. What is it that I don't understand? > Is it not possible to complain about the Dim statement or just an oversite of > the compiler? > > BTW how is all this crap creeping into the forum? > -- 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.
