Thank you all, it was my fault, it works by changing compiler target to 64. I'm sorry to bother you.
At the final, I wanted to combine "BobDog" and "dseligo" methods to run vba command from DLL, I was trying it with simple command : Range("A1").value = "Test"
But Excel hangs and stops working after calling funciton and also Lazarus returns this warning while compiling:
Warning: Symbol "RunCommand" is deprecated
Could you please take a look at the attached project ?