Có ai sửa bản này chạy được trên office 46 bit không ạ.
Không chạy được Macro đã tạo trên office 46 bit.
Option Explicit
Option Base 1
#If VBA7 Then
Public Declare PtrSafe Function CreateMenu Lib "user32" () _
As Long
#Else
Public Declare Function CreateMenu Lib "user32" () _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function CreatePopupMenu Lib "user32" () _
As Long
#Else
Public Declare Function CreatePopupMenu Lib "user32" () _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) _
As Long
#Else
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function GetMenu Lib "user32" (ByVal hWnd As LongPtr) _
As Long
#Else
Public Declare Function GetMenu Lib "user32" (ByVal hWnd As LongPtr) _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As LongPtr, _
ByVal wFlags As LongPtr, ByVal wIDNewItem As LongPtr, ByVal lpNewItem As String) _
As Long
#Else
Public Declare Function AppendMenu Lib "user32" Alias "AppendMenuA" (ByVal hMenu As LongPtr, _
ByVal wFlags As LongPtr, ByVal wIDNewItem As LongPtr, ByVal lpNewItem As String) _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function SetMenu Lib "user32" (ByVal hWnd As LongPtr, ByVal hMenu As LongPtr) _
As Long
#Else
Public Declare Function SetMenu Lib "user32" (ByVal hWnd As LongPtr, ByVal hMenu As LongPtr) _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function DestroyMenu Lib "user32" (ByVal hMenu As Long) _
As Long
#Else
Public Declare Function DestroyMenu Lib "user32" (ByVal hMenu As Long) _
As Long
#End If
#If VBA7 Then
Public Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As LongPtr, ByVal nIndex As LongPtr, ByVal dwNewLong As LongPtr) _
As Long
#Else
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _
ByVal hWnd As LongPtr, ByVal nIndex As LongPtr, ByVal dwNewLong As LongPtr) _
As Long
#End If
Public Const MF_SEPARATOR As Long = &H800&
Public Const MF_POPUP = &H10
Public Const MF_STRING = &H0
Public Const IDM_MU As Long = &H7D0
Public g_hPopUpMenu() As Long
Public g_hMenu As Long
Public g_hPopUpSubMenu() As Long
Public g_Rt() As Long
Public g_APIMacro() As String
Public g_hForm As Long
Public g_MNUSheet As Worksheet