'Excel プロセスの優先順位を上げるマクロ Declare Function SetPriorityClass Lib "kernel32" ( _ ByVal hProcess As Long, ByVal fdwPriority As Long) As Long Declare Function GetPriorityClass Lib "kernel32" ( _ ByVal hProcess As Long) As Long Declare Function GetCurrentProcess Lib "kernel32" () As Long Const IDLE_PRIORITY_CLASS = &H40 Const NORMAL_PRIORITY_CLASS = &H20 Const HIGH_PRIORITY_CLASS = &H80 Const REALTIME_PRIORITY_CLASS = &H100 Sub SetPriorityClass_High() Dim hProcess As Long Dim iRet As Long hProcess = GetCurrentProcess() iRet = SetPriorityClass(hProcess, HIGH_PRIORITY_CLASS) End Sub