PC Review


Reply
Thread Tools Rate Thread

break into an invisible instance of Excel

 
 
Smallweed
Guest
Posts: n/a
 
      6th Feb 2008
I've been running a scheduled task at night that involves opening an Excel
workbook and running some code. For some reason, although the task runs and
the code does its job, Excel is left hanging. It's invisible (unsurprisingly
as it was run by the scheduler) which means I can only see it listed in the
Processes tab of the Task Manager.

I've done some debugging using lines that write to a log file but haven't
managed to identify the problem. Does anyone know of a way to make a
reference to the hidden hanging instance of Excel so I can then have a look
at it?

(I've been looking at some API calls to find the window handler but can only
seem to return 0 or the handler of a new instance of Excel.)
 
Reply With Quote
 
 
 
 
HatesIT
Guest
Posts: n/a
 
      6th Feb 2008
probably have a dialog open from not setting DisplayAlerts to false

open notepad and put this line in it

GetObject(,"Excel.Application").Visible = True

save it as a .vbs file and run it
This will get the first instance of excel only so close any others...
hth

"Smallweed" wrote:

> I've been running a scheduled task at night that involves opening an Excel
> workbook and running some code. For some reason, although the task runs and
> the code does its job, Excel is left hanging. It's invisible (unsurprisingly
> as it was run by the scheduler) which means I can only see it listed in the
> Processes tab of the Task Manager.
>
> I've done some debugging using lines that write to a log file but haven't
> managed to identify the problem. Does anyone know of a way to make a
> reference to the hidden hanging instance of Excel so I can then have a look
> at it?
>
> (I've been looking at some API calls to find the window handler but can only
> seem to return 0 or the handler of a new instance of Excel.)

 
Reply With Quote
 
Smallweed
Guest
Posts: n/a
 
      6th Feb 2008
Thanks for those - very helpful

"HatesIT" wrote:

> probably have a dialog open from not setting DisplayAlerts to false
>
> open notepad and put this line in it
>
> GetObject(,"Excel.Application").Visible = True
>
> save it as a .vbs file and run it
> This will get the first instance of excel only so close any others...
> hth
>
> "Smallweed" wrote:
>
> > I've been running a scheduled task at night that involves opening an Excel
> > workbook and running some code. For some reason, although the task runs and
> > the code does its job, Excel is left hanging. It's invisible (unsurprisingly
> > as it was run by the scheduler) which means I can only see it listed in the
> > Processes tab of the Task Manager.
> >
> > I've done some debugging using lines that write to a log file but haven't
> > managed to identify the problem. Does anyone know of a way to make a
> > reference to the hidden hanging instance of Excel so I can then have a look
> > at it?
> >
> > (I've been looking at some API calls to find the window handler but can only
> > seem to return 0 or the handler of a new instance of Excel.)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Page Break Adjustments causes a page break each cell BKaufman Microsoft Excel Worksheet Functions 1 21st Apr 2010 02:59 PM
Invisible Text boxes cause the page to break - Why? FMFF Microsoft Access Reports 4 17th Nov 2008 02:44 PM
Invisible Text box causing page break? FMFF Microsoft Access Reports 1 5th Nov 2008 07:44 PM
Re: Invisible Section Break Preventing Alteration of Header Stefan Blom Microsoft Word Document Management 0 21st Dec 2006 05:03 PM
How do I get one instance of Excel to communicate with another instance? HONOREDANCESTOR@YAHOO.COM Microsoft Excel Programming 3 21st Nov 2006 10:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:52 AM.