QUOTE(born2c0de @ Jan 5 2005, 09:15 AM)
i checked it out...the dll works fine...but only on web-pages. It wont work for standalone applications.
Thanks though....Has anyone else had any luck?
are you using server.createobject in your vb code?
In reference to this section of the page you looked at:
QUOTE(Creating Visual Basic Components for ASP)
Creating the webpage
Open your HTML editor and type the following lines.
<HTML
<TITLE>Simple Calculator Test</TITLE>
<BODY>
<%
Dim AddResult,SubResult,MulResult,DivResult
Dim AddNum,SubNum,MulNum,DivNum
Set AddNum=Server.CreateObject("SimpleCalculator.Addnumbers")
This line of code will create the object which will allow us to interact with our dll "SimpleCalculator". It references the class object "AddNumbers".
Result=AddNum.Add(140774,51174)
if so try this
<-------------CUT HERE --------------------->
Private Sub Command1_Click()
Dim Result
Dim AddNum as Object
'Note in the following line there is no server. in front of CreateObject.
'Also note that VB will not show class members on the created object
'like it does with say... form. it will not do anything. so you must have
'a reference to what the classes members are.
Set AddNum=CreateObject("SimpleCalculator.Addnumbers")
Result=AddNum.Add(140774,51174)
msgbox "140774 + 51174 = " + str(result)
end sub
<-------------CUT HERE --------------------->
Hope this helps if it dosent i will also post some code to one of my programs.