Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

type mismatch on new instance

Status
Not open for further replies.

Ferlin

Programmer
Jan 18, 2001
71
US
Hi all,

I have a class called clschart in the class is a public event called datachanged that I am trying to use in a form for my chart of accounts. In the form right after the option explicit is the line.

Private WithEvents chartofaccts as Clschart

in the form_load sub routine is the line.

Set chartofaccts = New Clschart

the above line gives me a type mismatch error when I run the program.

There is also a chartofaccts_datachanged() routine that loads up my textboxes on the form with the data.

The event is defined and raised in the class as follows.

Right after the option explicit is the line.

Public Event datachanged()

there is a Load_Datafields sub routine that loads my member variables from my database and has the line.

RaiseEvent datachanged

Any Help would be appreciated.

Thanks in advance.

Ferlin.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top