+ Reply to Thread
Results 1 to 2 of 2

Dynamically generated Shell command

  1. #1
    Forum Contributor
    Join Date
    02-05-2015
    Location
    czech
    MS-Off Ver
    2010
    Posts
    172

    Dynamically generated Shell command

    Hello, I would like to run dynamically generated Shell commad. The Shell command looks like this:
    Shell "wscript somepath\script.vbs parametr i", vbNormalFocus

    I would like to run this script for sequnce of paramets i like following:

    Please Login or Register  to view this content.
    I tried to generate sequnce of commands in external txt file. The textfile contains serie of lines bellow, but I don't know how to run it.
    Shell "wscript somepath\script.vbs parametr 1", vbNormalFocus
    Shell "wscript somepath\script.vbs parametr 2", vbNormalFocus
    Shell "wscript somepath\script.vbs parametr 3", vbNormalFocus
    Last edited by jakopak; 02-08-2016 at 10:05 AM.

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: Dynamically generated Shell command

    Hi jakopak,

    The following may help you. I put 4 'double quotes' around each item that may contain an embedded space character.

    Excel Macro Code:
    Please Login or Register  to view this content.
    Wscript Code (my file ExcelForumParameterTest.vbs):
    Please Login or Register  to view this content.
    Lewis

+ 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. Shell command to rum dos copy command on vba
    By lepmor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-17-2015, 07:04 PM
  2. Dynamically Generated Form And Their Click Events
    By fenilbhoot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2013, 10:13 AM
  3. [SOLVED] Use VBA to download a dynamically generated image from the web.
    By nponoBegHuk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-01-2012, 09:51 AM
  4. Setting up a dynamically generated range reference
    By cveetan in forum Excel General
    Replies: 8
    Last Post: 02-22-2012, 07:37 AM
  5. Using macro to execute a command in Shell Command
    By aadarsh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-19-2010, 07:06 PM
  6. Get textbox value from custom/dynamically generated form
    By sonyidicula in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-16-2010, 08:52 AM
  7. Dynamically Generated Range using Macro
    By [email protected] in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2006, 03:15 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