Re: Determining whether Excel is running
From: Bill Murphy (wmurphy_at_houston.rr.com)
Date: 11/29/04
- Next message: John Spencer (MVP): "Re: Att John Spencer (MVP) Copy/Duplicate record problem"
- Previous message: John Vinson: "Re: urgent : recover deleted record"
- In reply to: Eric Schittlipz: "Re: Determining whether Excel is running"
- Next in thread: Graham R Seach: "Re: Determining whether Excel is running"
- Reply: Graham R Seach: "Re: Determining whether Excel is running"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 29 Nov 2004 02:09:10 GMT
Eric,
I believe you have answered my question. There was an Excel.exe process
running, even though no task was visible in Task Manager or on my task bar.
This could have resulted from an abnormal end to my program, which is still
in the testing mode. Is there a way in VBA to detect this hidden process
and kill it?
Bill
"Eric Schittlipz" <eric@schittlipz.com> wrote in message
news:codu79$72v$1@sparta.btinternet.com...
> "Bill Murphy" <wmurphy@houston.rr.com> wrote in message
> news:lKpqd.47698$KQ2.9267@fe2.texas.rr.com...
> > Doug,
> >
> > This function returns true when I run it from the immediate window for
> > both
> > Word and Excel, although I can see from my task bar and from Task
Manager
> > that neither of them is running. Could there be something else in my
> > Windows 2000 configuration that is confusing the issue for this function
> > and
> > for the IsExcelRunning function below?
> >
> > Bill
>
> In your Task Manager did you also check out the processes tab? If you are
> running code like you posted, you could easily start a hidden instance of
> Excel but not notice it in the Task Manager. Try setting the .visible
> property of the application object to true like this:
>
> Set xlApp = GetObject(, "Excel.Application")
> If Err.Number=0 Then
> IsExcelRunning=True
> xlApp.Visible=True
> End If
> Set xlApp = Nothing
>
> In general though, you should use some form of error handling to ensure
your
> code does not inadvertently leave a hidden instance running which you
> created and have left abandoned.
>
>
>
- Next message: John Spencer (MVP): "Re: Att John Spencer (MVP) Copy/Duplicate record problem"
- Previous message: John Vinson: "Re: urgent : recover deleted record"
- In reply to: Eric Schittlipz: "Re: Determining whether Excel is running"
- Next in thread: Graham R Seach: "Re: Determining whether Excel is running"
- Reply: Graham R Seach: "Re: Determining whether Excel is running"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|