Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
call a DLL within Excel.
I have the following instructions to call a DLL from Visual Basic. don't know how to do this and wondered if someone could assist me o explain to me in layman's terms how to accomplish it. Thanks, Jim This is the calling routine from Visual Basic ‘------------------------------------------------------------------------------------- Option Explicit Private Sub Command1_Click() ' trsm = InputBox("enter legal location") meridian = InputBox("OPTIONAL/enter meridian") state = InputBox("OPTIONAL/enter state XX") Call trsm2ll(trsm, Len(trsm), meridian, Len(meridian), state Len(state), lat, lng, lerror) MsgBox "latitude=" & lat & " longitude=" & lng & " error=" & lerror & trsm=" & trsm & " state=" & state & " meridian=" & meridian End Sub ‘--------------------------------------------------------------------------------------------------- And this is the Module declaration. ‘-------------------------------------------------------------------------------------------- Option Explicit Public lerror As Integer Public lat As Single Public lng As Single Public state As String * 2 Public meridian As String * 2 Public trsm As String * 16 Declare Sub trsm2ll Lib _ "TRSM2LL.DLL" _ (ByVal trsm As String, ByVal l1 As Long, _ ByVal meridian As String, ByVal l2 As Long, _ ByVal state As String, ByVal l3 As Long, _ lat As Single, _ lng As Single, _ lerror As Integer) The following Visual Fortran DLLs must be present on you computer: DFORRT.DLL DFORMD.DLL MSVCRT.DL -- Jim1 ----------------------------------------------------------------------- Jim15's Profile: http://www.excelforum.com/member.php...fo&userid=2630 View this thread: http://www.excelforum.com/showthread.php?threadid=52486 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
Call Excel Macro in VB.NET | Excel Programming | |||
Help with VB Call function from Excel | Excel Programming | |||
Call other application from excel | Excel Programming | |||
COM-call-in to Excel | Excel Programming |