View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Kill Excel VBS

I'm gonna guess that you sometimes automate excel from different applications
(MSWord???).

And when you do this, you could start a new instance of excel and kept it
hidden.

And something bad happens in the code (or you just stop it) and it leaves that
hidden instance of excel still running.

My guess is that "kill excel.vbs" is a script that looks for and tries to kill
any running instances of excel. It can be easier that alt-ctrl-delete and
searching for that rogue instance of excel.exe.

I have a similar script that unhides excel/Word/Outlook. It looks like:

dim myXL
On Error Resume Next
Set myXL = GetObject(, "Excel.Application")
If Err.Number = 429 Then
msgbox "Excel is not running"
else
myxl.visible = true
end If
On Error GoTo 0
Set myxl = nothing

dim myWord
On Error Resume Next
Set myWord = GetObject(, "Word.Application")
If Err.Number = 429 Then
msgbox "Word is not running"
else
myWord.visible = true
end If
On Error GoTo 0
Set myWord = nothing

dim myOutlook
On Error Resume Next
Set myOutlook = GetObject(, "outlook.Application")
If Err.Number = 429 Then
msgbox "Outlook is not running"
else
myOutlook.visible = true
end If
On Error GoTo 0
Set myOutlook = nothing



Rob wrote:

Hi,

I have just noticed and deleted a file called Kill Excel vbs that was in my
Windows folder and in my program list. I'm guessing this is some kind of
virus but can't find anything on this subject. Any ideas as to what this
might have been?

Rob


--

Dave Peterson