+ Reply to Thread
Results 1 to 11 of 11

First Check An Application is running or not using vba then run the code

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Post First Check An Application is running or not using vba then run the code

    hi everyone

    i want check using vba my aap (Tally.exe) is running or not,

    if tally running then run the code "Go" if not running the first open tally.exe then run the code"Go"

    tally.exe path = Z:\42766\Jan 2 Dec 2014\Tally.ERP9\tally.exe

    thanx
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: First Check An Application is running or not using vba then run the code

    It's not a native VBA function so you will have to use the Windows API.

    Search for "VBA list all running applications" and review the results - you are going to have to understand the code so best to do a little reading as well as grabbing code you don't understand.

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: First Check An Application is running or not using vba then run the code

    Thanx for reply

    but cant understand

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: First Check An Application is running or not using vba then run the code

    What do you not understand? Search.

  5. #5
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: First Check An Application is running or not using vba then run the code

    I cant sort out that how to use Windows API with my requirement..

  6. #6
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: First Check An Application is running or not using vba then run the code

    Hi,

    You can also use WMI for such a task, which may be easier
    Please Login or Register  to view this content.
    With this function added you need only check for the application and run it if need be, thus
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  7. #7
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: First Check An Application is running or not using vba then run the code

    THANX
    xlnitwit

    i am using windows 8.1 x64 bit version

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: First Check An Application is running or not using vba then run the code

    The code should be fine for that version.

  9. #9
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: First Check An Application is running or not using vba then run the code

    Ur code is opening tally.exe again and again

    i want if tally is open then code stop, otherwise open the tally

  10. #10
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: First Check An Application is running or not using vba then run the code

    Hi
    dear xlnitwit

    code is working very fine now,

    thanx alot

    will add u repu+

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: First Check An Application is running or not using vba then run the code

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Go through each sheet and check a certain Cell value before running code...
    By spikedemike in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2015, 10:36 PM
  2. Code to find if Application is running or available
    By annux08 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2015, 12:49 AM
  3. [SOLVED] Check if cell is empty before running code
    By cajand in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2014, 03:01 PM
  4. [SOLVED] Running different code for multiple check box
    By pratyathedon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-15-2012, 05:16 AM
  5. Application Error 1004 running Pivot Code
    By grifter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2012, 12:23 PM
  6. make check before running the code
    By yiannis1925 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-03-2012, 05:34 AM
  7. How to check and see if an application (exe) is already running
    By jason_kelly in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-01-2010, 12:21 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1