B
B-rad
Hello Everyone,
I'm having a problem using excel vba to call the following dll code
which was created as a "Class Library" using Visual Basic 2008 Express
Edition (note: "Class Library" was the only project choice that I saw
that created a dll).
_________________________________________________________
Public Class Class1
Public Sub a1_home_cell(ByVal jun As Excel.Workbook)
MsgBox("You're In!")
' returns each sheet to the home position
Dim sh As Excel.Worksheet
'Dim jun As Excel.Workbook
For Each sh In jun.sh
'ActiveWorkbook.Worksheets()
sh.Activate()
sh.Range("A1").Select()
Next sh
End Sub
End Class
_________________________________________________________
However, when I attempt to call it from an excel 2000
vba sub routine as follows:
__________
Public Declare Sub a1_home_cell Lib "C:\Documents and Settings\b-rad\My
Documents\Visual Studio 2008\Projects\junk\junk\obj\Release\junk.dll"
(current_workbook As Workbook)
Sub attempt5()
Call a1_home_cell(ActiveWorkbook)
End Sub
__________
I get an error stating:
"Run-time error ‘453’:
Can’t find DLL entry point . . ."
From the messagebox I placed at the beginning of the dll, I see that,
just as the error message states, its not even getting into the dll.
Any ideas?
Thanks,
B-rad
I'm having a problem using excel vba to call the following dll code
which was created as a "Class Library" using Visual Basic 2008 Express
Edition (note: "Class Library" was the only project choice that I saw
that created a dll).
_________________________________________________________
Public Class Class1
Public Sub a1_home_cell(ByVal jun As Excel.Workbook)
MsgBox("You're In!")
' returns each sheet to the home position
Dim sh As Excel.Worksheet
'Dim jun As Excel.Workbook
For Each sh In jun.sh
'ActiveWorkbook.Worksheets()
sh.Activate()
sh.Range("A1").Select()
Next sh
End Sub
End Class
_________________________________________________________
However, when I attempt to call it from an excel 2000
vba sub routine as follows:
__________
Public Declare Sub a1_home_cell Lib "C:\Documents and Settings\b-rad\My
Documents\Visual Studio 2008\Projects\junk\junk\obj\Release\junk.dll"
(current_workbook As Workbook)
Sub attempt5()
Call a1_home_cell(ActiveWorkbook)
End Sub
__________
I get an error stating:
"Run-time error ‘453’:
Can’t find DLL entry point . . ."
From the messagebox I placed at the beginning of the dll, I see that,
just as the error message states, its not even getting into the dll.
Any ideas?
Thanks,
B-rad