quote:
Originally posted by ecion
but its both a function and a property? As I said, I was going by the example given in the thread Matty Linked to. So my DLL has the following:
Public Function ContactID() As String
ContactID = "Hello"
End Function
So i should be able to assign values to contactID right?
No.
ContactID(), in your VB example, is just a function without any input parameters. It can only output a string, nothing more; it isn't a property either. So all you can do in JScript with it is calling the function, you can't pass anything to it.
What you probably want is making a function which also accepts a parameter:
VB (in the public class)
code:
Public Function ContactID(inputstring As String) As String
ContactID = "Hello " & inputstring
End Function
JScript
code:
var MyActiveXObject = new ActiveXObject('Project1.Class1');
Debug.Trace(MyActiveXObject.ContactID(Messenger.MyName));