#If VBA7 And Win64 Then '64 bit için
Private Declare PtrSafe Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
#Else '32 bit için
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long
#End If
yukardaki koda dikkat ederseniz 64 ve 32 arasındaki tek fark "PtrSafe "hem 32 hem de 64te çalışması için 2 2 türlü de yazmalısınız.