06-08-2012, 06:28 PM
Thanks ssvali for taking the initative.
Here is the first UDF from me.
This will close any running application from taskbar.
Regards,[/code]
Ankesh
Here is the first UDF from me.
This will close any running application from taskbar.
Code:
'***************************************************************************************************************************************************************
'Function : CloseProcess
'Author : Ankesh
'Reviewer :
'Version No :
'Date Created :
'Last Updated :
'Desc : Forecefully kills a process displayed on the task manager. StrProgramName should contain the process name with extension
'***************************************************************************************************************************************************************
Public Function CloseProcess(strProgramName)
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "TASKKILL /F /IM " & strProgramName
Set objShell = Nothing
End Fun
'calling the function
Call CloseProcess("EXCEL.EXE") ''Closes excel
Call CloseProcess("Iexplore.EXE") ''Closes IE
'Similar way you can pass any application name running in taskmanager. Function will kill them all.
Regards,[/code]
Ankesh