Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Discovering background EXCEL running (Excel 2000)

    Does anyone a good coding technique of discovering background running Excel apps, those ones that are invisble and can be seen in the task manager?

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Discovering background EXCEL running (Excel 20

    Thanks to <!profile=Kevin>Kevin<!/profile>, I came across <!mskb=187913>Microsoft Knowledge Base Article 187913<!/mskb> some time ago. While, I have used it for a 3rd party app, it should be adaptable for Excel also. HTH
    Gre

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Reading/Swindon, Berkshire, United Kingdom
    Posts
    664
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Discovering background EXCEL running (Excel 2000)

    Not a coding method for vba as such, but if Unkamunka's solution doesn't work for you, this came up somewhere else very recently (VB/VBA forum?) Paste the following code into notepad and save it as "check_Excel.vbs" to your desktop. double clicking will run the file - as long as vbs scripting is enabled. the method is courtesy of Rob Bruce. Note that it will also grab visible instances.

    FWIW I now have one for word, access, powerpoint and excel on my desktop.

    '################################## CODE START
    ' XLcheck.vbs
    ' Find an invisible instance of Excel
    ' from Rob Bruce (www.rb-ad.dircon.co.uk)

    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
    '########################### CODE END

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Discovering background EXCEL running (Excel 2000)

    From this site:

    http://vbnet.mvps.org

    I copied this code:

    <pre>Option Explicit
    '''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''
    ' Copyright
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •