判断Excel单元格是否处于编辑状态
以下是平时收集到的一个判断表格单元格是否处理编辑状态的代码,记不住是从哪弄的,转给大家,供学习参考。
'//取得类名
Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
'//设置钩子函数
Public Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long
'//结束钩子
Public Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long
'//下一个钩子
Public Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal n