Click to See Complete Forum and Search --> : class modules


January 7th, 2000, 04:55 PM
I want to know how to use the implements statement.

Actually what i did was i created a class module A and also created another class module B different activexexe projects
In B i declared a procedure public sub SAVED()
end sub
In A 's general declaration i wrote IMPLEMENTS B
and i declared procedure private sub saved() end sub

In the form I created a Obj of B and then
Set OBj = new a
ANd i said a.saved.
But iam getting error
Highlighting the IMplement statement in A
Object Module needs to implemnt saved for interface B

Chris Eastwood
January 7th, 2000, 05:39 PM
You need to implement all the interfaces from B into A

Open up the class module for A and click on the left hand combo in the code window - you should see 'B' - make sure that you have a procedure defined for each property/methog that B exposes, *EVEN IF THEY ARE EMPTY*

eg


Implements B
'
private Sub B_Saved()
' nothing In Here
End Sub




The procedure is marked as Private as it can't be accessed through an object of type A - only of type B



Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb