A new Flexera Community experience is coming on November 25th. Click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

If you are using the XML Macro (XMLExport) for LCM Import Launcher and you have been switching to a 64bit version of Excel you might get the following error.

Symptoms

If you are using the XML Macro (XMLExport) for Spider LCM Import Launcher and you have been switching to a 64bit version of Excel you might get the following error:

German:
Fehler beim Kompilieren:

Der Code in diesem Projekt muss für die Verwendung auf
64-Bit-Systemen aktualisiert werden. Überarbeiten und aktualisieren Sie
Declare-Anweisungen, und markieren Sie sie mit dem PtrSafe-Attribut.


Cause

Microsoft has changed the method to declare functions for 64bit versions of VBA


Resolution

Change the following lines within the Excel Macro (General > Declarations) using Alt+F11 to get to the code

Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long

to

#If Win64 Then
  Private Declare PtrSafe Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
  Private Declare PtrSafe Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  Private Declare PtrSafe Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
  Private Declare PtrSafe Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
#Else
  Private Declare Sub CoTaskMemFree Lib "ole32.dll" (ByVal hMem As Long)
  Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" (ByVal lpString1 As String, ByVal lpString2 As String) As Long
  Private Declare Function SHBrowseForFolder Lib "shell32" (lpbi As BrowseInfo) As Long
  Private Declare Function SHGetPathFromIDList Lib "shell32" (ByVal pidList As Long, ByVal lpBuffer As String) As Long
#End If

and safe the macro/project resp. the Excel sheet.


Additional Information

Microsoft KB:
http://msdn.microsoft.com/en-us/library/office/gg278832.aspx

Products

LCM5, LCM6

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Oct 22, 2018 09:49 PM
Updated by: