+ Post New Thread
Results 1 to 6 of 6
Scripts Thread, execute command line in VBA in Coding and Web Development; Hi All, I have a requirement of running the dos command line below in VBA. Any help with the code/syntax ...
  1. #1

    Join Date
    Jul 2010
    Posts
    25
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    execute command line in VBA

    Hi All,

    I have a requirement of running the dos command line below in VBA. Any help with the code/syntax will be much appreciated.

    c:\> eRaiseFlag.exe /FlagName:CreateFolder

    Thanks

    TS

  2. #2

    Join Date
    Jul 2010
    Posts
    25
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Please note running the cmd directly works fine.

  3. #3

    maniac's Avatar
    Join Date
    Feb 2007
    Location
    Kent
    Posts
    3,087
    Thank Post
    210
    Thanked 432 Times in 312 Posts
    Rep Power
    146
    Edit, ignore that - you said VBA not VBS.
    Last edited by maniac; 14th September 2010 at 03:26 PM. Reason: Read the question properly.

  4. #4

    Join Date
    Jul 2010
    Posts
    25
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    thanks maniac.. hope you can help

  5. #5
    dwhyte85's Avatar
    Join Date
    Mar 2009
    Location
    Berkshire
    Posts
    1,236
    Thank Post
    163
    Thanked 153 Times in 138 Posts
    Rep Power
    104
    strDOSCMD = "cmd.exe /c ..."
    sCmdLine = strDOSCMD
    'SEND TO DOS
    dblRetVal = Shell(sCmdLine, vbHide)
    Send Dos Commands (post 3)
    Last edited by dwhyte85; 14th September 2010 at 06:38 PM.

  6. #6

    Join Date
    Jul 2010
    Posts
    25
    Thank Post
    1
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    thanks dwhyte85.. i'll give this a go



SHARE:
+ Post New Thread

Similar Threads

  1. VBA in Word 2007 - to split a mail merge, just one line needed!
    By CaterinaAnna in forum Office Software
    Replies: 2
    Last Post: 9th July 2010, 03:51 PM
  2. esx command line help
    By ful56_uk in forum Thin Client and Virtual Machines
    Replies: 6
    Last Post: 17th February 2010, 06:04 PM
  3. NTBackup - Command Line
    By dave.81 in forum Windows
    Replies: 2
    Last Post: 7th May 2008, 10:46 AM
  4. Office Command Line ID
    By alan-d in forum How do you do....it?
    Replies: 4
    Last Post: 23rd April 2008, 11:51 AM
  5. Command LIne
    By wesleyw in forum Windows
    Replies: 4
    Last Post: 12th October 2006, 12:10 PM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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