Modern-UI-Components-for-VBA icon indicating copy to clipboard operation
Modern-UI-Components-for-VBA copied to clipboard

Compilation error with dual running x86 and x64

Open jlln28 opened this issue 1 year ago • 1 comments

Hello,

I have an access database and need to run on office x86 and x64. I have adapt your code to load the right DLL :

Public Function DLL() As Object
    On Error Resume Next
    If dllObject Is Nothing Then
        'load from the dll
#If Win64 Then
    LoadLibrary (Application.CurrentProject.Path & "\KrishDll\x64\VBA_TOOLS.dll")
#Else
    LoadLibrary (Application.CurrentProject.Path & "\KrishDll\x86\VBA_TOOLS.dll")
#End If
        Set dllObject = KRISH_VBA_TOOLS()
        
        On Error Resume Next
        
        'Send this applicaiton full name to the dll for future references. i.e. call backs
        dllObject.SetAccessApplicationPath CurrentProject.FullName
        
        'Enable this to see any erros happening when loading the dll
        dllObject.ShowDllWarnings = True
    End If
    
    Set DLL = dllObject
End Function

But when I want to compile I have an error on Function Toast : FormHelper. variable not define.

I don't understand why ? Can you help me.

Ps: Thx for your good job and share it with the community

jlln28 avatar Jan 26 '23 06:01 jlln28