Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tod tod is offline
external usenet poster
 
Posts: 114
Default Get info from running Excel instance

Is there a vba or vb solution to getting information about open
instances of Excel? For example, I have an instance of Excel open,
viewing it from the Task Manager. It's not visible so I don't know what
it is or what workbook it might have open, etc. Is there a way (API or
other) that I can say 'give me the scoop on this open instance of
Excel'?

tod

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default Get info from running Excel instance

This is VB script to find invisible instances of Excel. It should make the
instance visible so you can then see what it is and close it.

' XLcheck.vbs
' Find an invisible instance of Excel

Dim objXL, strMessage

On Error Resume Next

' Try to grab a running instance of Excel:
Set objXL = GetObject(, "Excel.Application")

' What have we found?
If Not TypeName(objXL) = "Empty" Then
strMessage = "Excel Running."
Else
strMessage = "Excel Not Running."
End If

' Feedback to user...
MsgBox strMessage, vbInformation, "Excel Status"

' Make it show so we can kill it
if strMessage = "Excel Running." then objXL.Visible = true

' End of VBS code

Hope this helps
Rowan

"Tod" wrote:

Is there a vba or vb solution to getting information about open
instances of Excel? For example, I have an instance of Excel open,
viewing it from the Task Manager. It's not visible so I don't know what
it is or what workbook it might have open, etc. Is there a way (API or
other) that I can say 'give me the scoop on this open instance of
Excel'?

tod


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
my excel settings changed and i have only 1 instance running. Melissa Setting up and Configuration of Excel 1 March 28th 10 04:30 AM
Running Two Instance of Excel 2003 Simultaneously - Advice Please Dermot Excel Discussion (Misc queries) 11 February 20th 08 12:04 AM
Check for instance of EXCEL running Kevin Excel Programming 3 September 14th 04 01:03 PM
How to determine if instance of Excel is running anandmr Excel Programming 7 December 23rd 03 05:24 PM
opening and running macros in an Excel file in a new instance of Excel Malone[_2_] Excel Programming 0 September 30th 03 01:58 AM


All times are GMT +1. The time now is 06:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"