title: VBA Excel DLL - Error 48
body: <p>I've recently gotten a piece of VBA code that was made on a 2003 based Office edition and is 32 bit based. I only have 64 bit Office 2016, and I updated the code to below - yet when I run the macro I get a "Run-time Error - File Not Found "Swings4-2.dll". Even if I remove the file extension an error still pops up. The DLL file is located in the same directory as the XLS/XLSM file, and even if I quote the full directory of the file - it continues to give me an error.</p>
  
  <pre><code>#If VBA7 And Win64 Then
      Private Declare PtrSafe Sub Swings Lib "Swings4-2.dll" (ByRef Par1 As Integer, ByRef Par2 As Integer, _
         ByRef Par3 As Single, ByRef Par4 As Single, ByRef Par5 As Single, ByRef Par6 As Single, _
         ByRef Par7 As Single, ByRef Par8 As Single, ByRef Par9 As Single, ByRef Par10 As Single, _
         ByRef Par11 As Single, ByRef Parl2 As Single, ByRef Parl3 As Single, ByRef Parl4 As Single)
  #Else
      Private Declare Sub Swings Lib "Swings4-2.dll" (ByRef Par1 As Integer, ByRef Par2 As Integer, _
         ByRef Par3 As Single, ByRef Par4 As Single, ByRef Par5 As Single, ByRef Par6 As Single, _
         ByRef Par7 As Single, ByRef Par8 As Single, ByRef Par9 As Single, ByRef Par10 As Single, _
         ByRef Par11 As Single, ByRef Parl2 As Single, ByRef Parl3 As Single, ByRef Parl4 As Single)
  #End If
  </code></pre>
  
  <p>Help will be greatly appreciated</p>