i am trying to compile the code below but i keep getting this error how do i
fix it?
Private object modules can not be used in public object modules as
parameters or rturn types for public procedures as public data members or as
field of public defined types.
Public Function launchPerDiem(ByVal Lonum As Double, ByVal frmPerD As Form)
As Form
LoanNo = Lonum
Set frmPerD = New frmPerDiemAudit
launchPerDiem = frmPerD
End Function
Ken Halter - 17 Nov 2004 17:52 GMT
>i am trying to compile the code below but i keep getting this error how do
>i
> fix it?
You'll need to return that form As Object. VB is the only one that "knows"
what As Form means. Public members of a dll must be COM compliant... which
means that you can't expose VB specific object types (form, textbox,
whatever) to the public.

Signature
Ken Halter - MS-MVP-VB - http://www.vbsight.com
Please keep all discussions in the groups..
Bharat Sharma - 30 Dec 2004 09:44 GMT
Use this:
Public Function launchPerDiem(ByVal Lonum As Double, ByRef frmPerD As Object) as Boolean
On Error Goto OnError
LoanNo = Lonum
Set frmPerD = New frmPerDiemAudit
launchPerDiem = true
Exit Function
OnError:
launchPerDiem = false
End Function
>i am trying to compile the code below but i keep getting this error how do i
>fix it?
[quoted text clipped - 11 lines]
>
>

Signature
Best,
_____________
Bharat Sharma
* TEN Technologies.
* Official Web: _www.ten-technologies.com_
<http://www.ten-technologies.comemail/>
Personal Web: _www.bharatsharma.net_ <http://www.bharatsharma.net/>