473,327 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

How to build a .NET DLL for VBA?

I want to make a VB.NET DLL that can be called from Microsoft Access
2003, i.e. VBA. I have created the class library in VB 2005 and created
a public function Test1. In the VBA code I added the code header to
access the DLL function, shown below.

Private Declare Function Test1 Lib "Test1.dll" _
(ByVal ToAdr As String, ByVal FromAdr As String) As Long

When I call the function Test1, from Access, I get the error message:
"Run-time error '453':
Can't find DLL entry point Test1 in Test1.dll

I don't know what I need to do to fix this. Can someone help me?

John Peterson
Oct 22 '08 #1
1 7108
You expose classes not "old fashioned" exported functions.

See :
http://www.playinthesoup.com/soup/ar.../regforcom.htm
and ://msdn.microsoft.com/en-us/library/zsfww439(VS.80).aspx for detailed
information.

then you reference the DLL as you would do for any other COM based DLL and
then you can start using its classes..

--
Patrice
"John" <me@nospam.coma écrit dans le message de groupe de discussion :
MP************************@newsgroups.comcast.net...
I want to make a VB.NET DLL that can be called from Microsoft Access
2003, i.e. VBA. I have created the class library in VB 2005 and created
a public function Test1. In the VBA code I added the code header to
access the DLL function, shown below.

Private Declare Function Test1 Lib "Test1.dll" _
(ByVal ToAdr As String, ByVal FromAdr As String) As Long

When I call the function Test1, from Access, I get the error message:
"Run-time error '453':
Can't find DLL entry point Test1 in Test1.dll

I don't know what I need to do to fix this. Can someone help me?

John Peterson

Oct 22 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: AIM | last post by:
Error in msvc in building inheritance.obj to build hello.pyd Hello, I am trying to build the boost 1.31.0 sample extension hello.cpp. I can not compile the file inheritance.cpp because the two...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
2
by: Rudy Ray Moore | last post by:
How can I modify the project build order of a multi-project workspace under "Visual Studio .net 2003 7.1 c++"? I tried to modify the .sln by hand to influence the build order, but it didn't seem...
3
by: Julian | last post by:
Build.Net is a build tool that parses and builds VS.NET project files. Build.Net is run from the command line. It recursively searches a directory for VS.NET project files to build. This...
0
by: Andrew Ayre | last post by:
Hi, I can't seem to get the library built, and any help is greatly appreciated. Here is the info: Windows XP Borland C++ Builder 5 Latest Boost source code (downloaded at the weekend) Windows...
1
by: AlexZh | last post by:
Hi, I'd like to stop command line build by one project build failed. To do that I've created simple AddIn (see code below), that works fine for IDE and does not work for command line. In the AddIn...
5
by: eranshuman | last post by:
Hi, I m very new to perl I m running an API which have the Buil.pl When Im compiling using perl Build.pl I was getting error : Can't locate Module/Build.pm in @INC (@INC contains:...
0
by: Akira Kitada | last post by:
Hi list, I was trying to build Python 2.6 on FreeBSD 4.11 and found it failed to build some of the modules. """ Failed to find the necessary bits to build these modules: _bsddb ...
0
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for...
0
by: Akira Kitada | last post by:
Hi Marc-Andre, Thanks for the suggestion. I opened a ticket for this issue: http://bugs.python.org/issue4204 Now I understand the state of the multiprocessing module, but it's too bad to see...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.