referansları kontrol eder misiniz, her hangi birinde missing yazıyor mu?
vba penceresi (alt+F11)-->tools-->references
Not: modüle aşağıdaki kodu ekleyip dener misiniz
Kod:
#If VBA7 And Win64 Then '64 bit için
Public Declare ptrsafe Function GetSystemMetrics Lib "user32.dll" (ByVal index As Long) As Long
#Else '32 bit için
Public Declare Function GetSystemMetrics Lib "user32.dll" (ByVal index As Long) As Long
#End If