|
-
Feb 14th, 2001, 09:44 AM
#1
Thread Starter
New Member
I have a couple of compiled, registered Java classes that I am using as COM objects in VB.
I am able to load and use various methods of my classes to set and retrieve data but am having problems with one in particular.
I want to pass one of the classes to the other as a method argument:
e.g:
Dim objDataClass As DataClass.DataClass
Set objDataClass = CreateObject("DataClass")
Dim objDoCalc As DoCalc.DoCalc
Set objDoCalc = CreateObject("DoCalc")
Dim iNumber1 As Integer
iNumber1 = 5
' ** This method works fine
objDataClass.setNumber (iNumber1)
' ** This doesn't work
objDoCalc.SetData (objDataClass)
At this point I receive a 'Run-time error 424: Object required' error message.
Why can't I pass one class to another? I notice that VB changes the method name from 'setData' to 'SetData' when I attempt to pass in my own object.
Is it possible to do this? Where am I going wrong?
Many thanks,
Maeve
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|