ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Creating a Windows DLL with Visual Basic
Subject:   Works GREAT in both VB and VBA
Date:   2005-06-14 11:44:28
From:   Lawrence19103
I created the project exactly as described and set the functions in both VB (a new test project) and in VBA(a Microsoft Access Database - both MDB and MDE). The function calls are really REALLY good. No problems. Well, when I first tried to MakeDLL, I was trying to save it to a different folder...the system looks in the DESTINATION folder for the components, so...just save it to the project folder and copy it to where ever you need it.

Now that I've mastered getting my functions into DLL's, I want to open a form - yep, I get a 429-ActiveX component Cannot Create Object (it blows out at PT=2 below):

Public Function Test() As Integer
On Error GoTo ERR_Test
Dim PT As Integer
PT = 1
Dim fTest As New Form1
PT = 2
Load fTest
PT = 3
fTest.Show vbModeless
PT = 4

Exit Function

MsgBox Err.Number & " - " & Err.Description & " PT: " & PT
Exit Function
End Function

I spent 4-5 days looking for this article. Can't spend another 5 days looking for the solution. Any suggestions???

PS: I've already Registered both DAO360.DLL and this DLL - Still no luck. And, yes the code is sloppy - I'm experimenting...

1 to 1 of 1
  1. Works GREAT in both VB and VBA
    2005-07-08 06:59:42  JohnDrinkall [View]

1 to 1 of 1