Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro to return data from a DLL

Status
Not open for further replies.

ReportSmithing

Programmer
Apr 15, 2005
41
0
0
US
I've created a simple ActiveX DLL but can not get the below code to return a value. The macro compiles successfully and the macro recognizes and "see" the function, but I'm not getting any return data.

Does anyone know (or what to write) to present the value back through the macro.


Declare Function PassData Lib "c:\PassDataDll.dll"(ByVal themsg as string)as integer

Sub TESTDLL()

dim themsg as string
dim result as variant

themsg = ""
result = PassData(themsg)
MsgBox themsg

End Sub


Thank you!
 
try:

MsgBox result

CharlesCook.com
ADP - PeopleSoft - SAP
ReportSmith - Crystal Reports - SQR - Query - Access
Reporting - Interfaces - Data Mining
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top