• Discovering background EXCEL running (Excel 2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Discovering background EXCEL running (Excel 2000)

    Author
    Topic
    #400199

    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?

    Viewing 5 reply threads
    Author
    Replies
    • #778973

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

    • #778974

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

    • #779884

      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 (http://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

    • #779885

      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 (http://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

    • #779974

      From this site:

      http://vbnet.mvps.org[/url%5D

      I copied this code:

      Option Explicit
      ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
      ' Copyright
    • #779975

      From this site:

      http://vbnet.mvps.org[/url%5D

      I copied this code:

      Option Explicit
      ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
      ' Copyright
    Viewing 5 reply threads
    Reply To: Reply #778973 in Discovering background EXCEL running (Excel 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel