title: how to make VBA code compatible for office 2010 - 64 bit version and older office versions
body: <p>I have observed an issue with below function call when we migrated to office 2010-64 bit version.</p>
  
  <pre><code>Private Declare Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  </code></pre>
  
  <p>According to information available on <a href="http://msdn.microsoft.com/en-us/library/ee691831.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/ee691831.aspx</a> link. I have changed above call as below and it has been working fine on office 2010 64 bit version.</p>
  
  <pre><code>Private Declare PtrSafe Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long)
  </code></pre>
  
  <p>The problem is, I need to make same call to work on older office versions as well and it throws compile error on older versions. </p>
  
  <p>Has anyone any idea how to make this call working for office 2010 and older office versions.</p>