Hi,
I tried the following, and it worked pretty good:
Replace "Word.Application" with "Excel.Application" for MS Excel.Code:Dim appObj As Object On Error Resume Next Set appObj = GetObject(, "Word.Application") If Err Then MsgBox "Word is not running" Else MsgBox "Word will be closed!" appObj.Quit End If
Roger




Reply With Quote