title: How to convert 32-bit excel VBA code to run on 64-bit excel?
body: <p>I am able to use these codes in my Excel 2007 at the office, but how come I cannot use it in my Excel 2016?</p>
  
  <p>It says that it isn't built on 64-bit, but how do I convert it? The code below is highlighted in red.</p>
  
  <pre><code>Private Declare Function FindWindow Lib "User32" _
  Alias "FindWindowA" ( _
  ByVal lpClassName As String, _
  ByVal lpWindowName As String) As Long
  
  Private Declare Function GetWindowLong Lib "User32" _
  Alias "GetWindowLongA" ( _
  ByVal hwnd As Long, _
  ByVal nIndex As Long) As Long
  
  Private Declare Function SetWindowLong Lib "User32" _
  Alias "SetWindowLongA" (ByVal hwnd As Long, _
  ByVal nIndex As Long, _
  ByVal dwNewLong As Long) As Long
  
  Private Declare Function DrawMenuBar Lib "User32" ( _
  ByVal hwnd As Long) As Long
  </code></pre>
  
  <p>Error is shown below:
  <a href="https://i.stack.imgur.com/CbJ4g.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CbJ4g.png" alt="Error"></a></p>