Since you mention "... dll from which a macro is called..." without describing what the DLL is and how it calls the macro (I assume that by "macro" you do mean a public Sub that is defined in a VBA module), that makes people hesitate to respond.
Let me simplify the question: your user could copy your VBA file (*.dvb) along with some other resources (block files, font files...) to a folder of his/her computer at his/her choice. You want the code in your VBA project to be able to know where the folder is during execution.
Firstly, I would write code in the VBA project to always search current support paths for required resources, and ask user to place your VBA project file and its required resources in one of the support paths. You might also ask user to make sure the VBA file in in a trusted location. This approach is more in line with AutoCAD's setup traditions.
If you really want to know the actual path of VBA project file that user could be randomly placed by the code inside the VBA project, you can get it by using MS VBA Extensibility 5.x. Firstly, add reference to Microsoft Visual Basic for Application Extensibility 5.3, the you can write following Function:
Public Function GetVbaProjectFileName(vbProjName As String) As String
Dim vb As VBIDE.VBE
Set vb = ThisDrawing.Application.VBE
Dim proj As VBIDE.VBProject
Dim fName As String
On Error Resume Next
For Each proj In vb.VBProjects
If UCase(proj.Name) = "MYVBAPROJECT" Then
fName = proj.FileName
If Err.Number <> 0 Then
fName = "The VBA Project has not been saved"
End If
GetVbaProjectFileName = fName
Exit Function
End If
Next
GetVbaProjectFileName = ""
End Function
Here is the sample code to use the Function to get VBA project's file name, as long as you know the project's name (of course you know, because you build the project and you name the project whatever you want) and it is loaded (of course it is loaded, because your are running it):
Public Sub Test()
Dim vbProjFile As String
vbProjFile = GetVbaProjectFileName("MyVBAProject")
If Len(vbProjFile) > 0 Then
MsgBox vbProjFile
Else
MsgBox "Cannot find VBA Project: not loaded."
End If
End Sub
HTH