我想运行一个简单的代码段,但每次访问和 Excel 都会崩溃。
我正在运行 CallbackTest2,你能帮帮我吗?谢谢分配。
Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" ( _
ByVal lpPrevWndFunc As Long, _
ByVal hwnd As Long, _
ByVal msg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) _
As Long
Sub CallbackTest2()
CallWindowProc AddressOf CallbackMsg, 0, 0, 0, 0
End Sub
Public Function CallbackMsg _
(msg As String, _
ByVal nUnused1 As Long, _
ByVal nUnused2 As Long, _
ByVal nUnused3 As Long)
MsgBox "CallBack Work :)" & msg
End Function