Results 1 to 4 of 4

Thread: Pass arguments from Userform to Shell func

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    singapore
    Posts
    86

    Question Pass arguments from Userform to Shell func

    I've got a Userform in Excel where by I take in 5 values...Section, date,time,no.of periods and mins(in integer)from textboxes.. When I get this values and click a command button, my program goes thru many processes after which I'm calling a Shell func(NOT in the Form Module but a normal module called ShellFunc). My Shelled program is a perl program that creates txt files. In order to do tat, I need to pass in 5 arguments when running the perl program.How to pass in the values taken from the userform to the Shell function.PLs help.Thanks alot for ur help.

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Doesn't the Shell function work?
    VB Code:
    1. Call Shell("""c:\the path\perl.exe"" arg1 arg2 arg3", vbNormalFocus)

  3. #3
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    Does the perl program accepts commandline parameters, or do you have to enter the values after the program started?
    Frans

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Mar 2003
    Location
    singapore
    Posts
    86
    It accepts commandline parameters (5 of them) to create text files.but inmy case I have to capture the Userform values and pass it in a module which has a Shell func..The above code I tried but can't run coz ther's a head but no body or tail..I don't know how to do it..pls help anyone.

Posting Permissions

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



Click Here to Expand Forum to Full Width