+ Reply to Thread
Results 1 to 6 of 6

Syntax help - kick off .exe with 2 arguments?

  1. #1
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Syntax help - kick off .exe with 2 arguments?

    Good day...having some trouble getting my syntax correct and hoping somebody here can assist me.

    I have a python script which has been converted to an executable, and is sitting in a corporate network directory.
    My VBA script is dumping 2 .txt files into that same directory, and I need to kick off the .exe using the two filenames as arguments for the python script. I keep getting "file not found" or "syntax error" at each step. For what it's worth, I can run the .exe without the arguments when we hard code the file names into the python script. Here's what I have
    Please Login or Register  to view this content.
    I've tried with and without quotes, commas, double sets of quotes and so on. Any idea what I'm doing wrong?

    Thank you!

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Syntax help - kick off .exe with 2 arguments?

    Typically it would be something like:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Syntax help - kick off .exe with 2 arguments?

    Couldn't you alter the Python script to prompt you to select the files?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Syntax help - kick off .exe with 2 arguments?

    rorya -thanks, I've been playing around with it, but can't get it to work. I've asked the python people to modify their code so we can print out the arguments it's getting/using into a console window - that will allow me, I hope, to see what I'm actually getting to it.

    Norie - indeed that would be the route to use, but this python script is basically an engine that needs to be invisible to the user. In a nutshell, I have a spreadsheet with a couple of userforms that will be populated with data from 2 imported files. VBA will do some stuff, then ultimately, send 2 text files to a network drive. I will pass those filenames from VBA to the python script, which has been converted to an exe. When the python script finishes it's work, it will send two .csv files to that same network, and I will pick them back up from my VBA script.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Syntax help - kick off .exe with 2 arguments?

    Here's my flail at this:

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Contributor JP Romano's Avatar
    Join Date
    10-09-2008
    Location
    Princeton, NJ
    MS-Off Ver
    2010
    Posts
    500

    Re: Syntax help - kick off .exe with 2 arguments?

    Thank you for the replies - working with the python guys to see if they can print out the arguments as they are getting them... we're making great progress...thanks!

+ 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. When I see the answer I'll kick myself.
    By Stoobydoo in forum Excel General
    Replies: 4
    Last Post: 06-27-2017, 08:13 AM
  2. Need One Dropdown List to Kick off Another
    By Xbwalker in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-09-2015, 03:56 AM
  3. VBA to kick off audio or jpeg
    By JonathanB2 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-11-2014, 01:12 PM
  4. if function for free kick times
    By molemeister in forum Excel General
    Replies: 4
    Last Post: 04-21-2010, 09:10 PM
  5. if function for free kick times -
    By molemeister in forum Excel General
    Replies: 1
    Last Post: 04-21-2010, 08:58 PM
  6. Kick Access users out via Excel VBA
    By GeorgY in forum Access Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2009, 02:22 PM
  7. Kick Users Out of Sheet
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2007, 05:34 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