How to call a Class Method

srfpala

New member
Joined
Aug 6, 2007
Messages
3
Programming Experience
10+
In this project, I have a form (frmSales in the Pres Layer) which collects the sales transaction data.
I have a class called SalesTran in the DataLayer which has a method called SerializeTransaction() which
is to be called from frmSales
These live in a project called Ch12RnRBooks
As I key into frmSales " Call SalesTran.SerializeTransaction() "
I get an intellihelp message bubble showing the line below
Public Sub SerializeTransaction(SalesTran As Ch12RnRBooks.SalesTran)
This argument makes sense to me since I want to invoke the SerializeTransaction method of the SalesTran class.
However, as it suggests, I insert the argument ( shown below)
Call SalesTran.SerializeTransaction(SalesTran As Ch12RnRBooks.SalesTran)
:mad:
It responds by saying that SalesTran is a type and cannot be used as an Expression.
------------------------------------------------------------------------
Anyone see what I'm doing wrong ???
TIA
 
The method wants an argument of type Ch12RnRBooks.SalesTran, so you have to give it something that is of that type.
For a method Sub Say(message As String) you would give it a string like this: Say("hello").
 
Back
Top