ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Kill Excel VBS (https://www.excelbanter.com/excel-programming/374074-re-kill-excel-vbs.html)

Dave Peterson

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

Rob

Kill Excel VBS
 
Dave,

I often use a Word Mail Merge which has been known to have crashed a few
times, would this create the file Kill Excel or would someone have placed on
my computer?

Thanks, Rob

"Dave Peterson" wrote in message
...
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




Dave Peterson

Kill Excel VBS
 
I don't think so.

But I wouldn't be surprised if you saw this "kill excel.vbs" somewhere and
thought that you could use it if something (including MSWord's mail merge)
crashed it.

Personally, I'd rather not kill an instance of excel. I'll make it visible and
then close it myself. Then repeat until all hidden instances are closed.

Rob wrote:

Dave,

I often use a Word Mail Merge which has been known to have crashed a few
times, would this create the file Kill Excel or would someone have placed on
my computer?

Thanks, Rob

"Dave Peterson" wrote in message
...
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


--

Dave Peterson


All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com