View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] keavenmj@yahoo.com is offline
external usenet poster
 
Posts: 1
Default Runnig Excel without visible application

This was just the thing i've been looking for... but it dosn't work :(
I get a message box that pops up and tells me "Excel Running" .. and
then nothing happens.

I tried moving the "objXL.Visible = true" statement inside the first
If-Else, and that didn't work eaither. <grumble i have a crashed
version of excel sitting in my background somewhere that i need to get
to.

Jon Peltier wrote:
But you can get at that invisible Excel instance in a couple ways.
Ctrl-Alt-Del will give you the list of running apps, but you can only

kill it
from here. The other way was posted by Rob Bruce some time back.

Put this
code into a text file:

' === Begin script ===============
' from Rob Bruce
Dim objXL, strMessage
On Error Resume Next
Set objXL = GetObject(, "Excel.Application")
If Not TypeName(objXL) = "Empty" Then
strMessage = "Excel Running."
Else
strMessage = "Excel Not Running."
End If
MsgBox strMessage, vbInformation, "Excel Status"
if strMessage = "Excel Running." then objXL.Visible = true
' === End script ===============

Save it with a name like "XLcheck.vbs". If you have a hidden Excel

instance,
running this script will bring it up front. If there is no such

hidden
instance, it tells you that, too.

- Jon