Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Calling a DLL in MS-Excel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim - 21 Mar 2006 23:18 GMT
I have the following instructions to call a DLL from Visual Basic. I don't
know how to do this and wondered if someone could assist me or explain to me
in layman's terms how to accomplish it.

Thanks,

Jim

This is the calling routine from Visual Basi
‘-------------------------------------------------------------------------------------
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 Su
‘---------------------------------------------------------------------------------------------------
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.DLL
Chris - 22 Mar 2006 07:16 GMT
Either the DLLs aren't present on your system and they need to be or they
need to be registered, ex.

regsvr32 DFORRT.DLL

>I have the following instructions to call a DLL from Visual Basic. I don't
> know how to do this and wondered if someone could assist me or explain to
[quoted text clipped - 41 lines]
> DFORMD.DLL
> MSVCRT.DLL
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.