VB Bug, or is it me?

yogiwales

Newcomer
Joined
Jan 23, 2003
Messages
21
Location
Cardiff, Wales - UK
OK, this is sending me crazy!

I create a class called TransactionCollection, which is a strongly typed collection, and has a sub called add.

In another class i create an instance:

dim myTransactionClollection as TransactionCollection = new TransactionCollection()

I then want to add a Transaction to it:

dim aTransaction as Transaction = new Transaction()

to add it i would normally go:

myTransactionCollection.Add(aTransaction)

but when i press the "." the menu doesnt come up, and if i type it manually it states that "Decleration expected".

I am lost. Is this a bug?? if so how can i fix it, if not what am i doing wrong?
 
Which line is this error on? What is the context of this code (where
is it in relation to the rest of your program)?
 
I got it sorted now, i hadnt put the code withing a method, or routine. But once i did that it worked ok!

Small things can send u bonkers for hours, and the answer is so simple :-)
 
Back
Top