Private Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long
kodunun aşağıdaki gibi değiştirilmesi gerekiyor.
#If VBA7 Then
Private Declare PtrSafe Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long
#Else
Private Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long
#End If
bu şekilde düzeltirsen 32 bit ve 64 bitte sorunsuz çalışır.