Mã:
Public Type var64
#If Win64 Then
Long As LongPtr
#Else
Long As Long
#End If
End Type
#If VBA7 Then 'Office 64-bit
Public Declare PtrSafe Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#Else
Public Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
#End If
Em xin cảm ơn !