Hem / Tips & tricks
Sub DetectExcel()Const WM_USER = 1024 Dim hWnd As LonghWnd = FindWindow("XLMAIN", 0) If hWnd = 0 Then Exit Sub Else SendMessage hWnd, WM_USER + 18, 0, 0 End IfEnd Sub