+ Reply to Thread
Results 1 to 2 of 2

Call perl from VB

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2016
    Posts
    543

    Call perl from VB

    I am hoping that the VB below will run a perl script on a directory that changes based on user input. The issue I am having is I am a syntax error when calling the perl script. Is this not the right way to call a perl from VB? Thank you .

    VB
    Please Login or Register  to view this content.
    Last edited by cmccabe; 08-25-2015 at 04:29 PM.

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

    Re: Call perl from VB

    Hi cmccabe,

    Your Shell syntax looks correct. Extra 'double quote' characters are required in the runstring if the runstring contains spaces within a parameter, but your runstring appears to have no spaces. I was able to run the following without a problem:
    Please Login or Register  to view this content.
    You problem may be related to the Cygwin version of Perl. If I remember correctly, Cygwin executables run within their own Cygwin environment.

    As a test, I suggest you try your runstring from within a .bat file. If it runs from the .bat file, and the runstring contains no spaces within parameters, I think your Shell command should run as well.

    Other tests you can do is to use Shell with:
    a. Perl only and no file, then
    b. Perl and a file that is on a flashdrive (small parameter with less chance for typos)

    Unfortunately, I don't run Perl and have no further suggestions.

    Good luck.

    Lewis
    Last edited by LJMetzger; 08-26-2015 at 03:51 PM.

+ 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. call shell from VBA
    By cmccabe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2014, 03:52 PM
  2. [SOLVED] Shell function gives File not Found error
    By jewelsharma in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2014, 09:38 PM
  3. Call Shell - return code?
    By swoop99 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2013, 09:18 AM
  4. File Not Found error when opening User Form - need help tracing root of error
    By VBA FTW in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-25-2013, 03:48 PM
  5. Problem using shell to call batch file or cmd prompt
    By nickf829 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2011, 10:27 PM
  6. CALL SHELL doesn't recognise the directory
    By plancast in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2009, 12:00 PM
  7. Shell Invalid Procedure call or argument
    By rgans in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2005, 12:23 PM

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