|
-
Apr 8th, 2003, 11:55 AM
#1
Thread Starter
Lively Member
Userform to Shell function.
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.By the way,my shell program is not working too.
PHP Code:
Result = ShellExecute(gScr_hDC, "Open", "c:\windows\desktop\CreateAct\CreateActivity.pl", " 2,20/03/2003 ,13:15:00,8 ,30", "C:\", gSW_SHOWNORMAL)
2(section),20/03/2003(date) 13:15:00(time), 8(no.of periods),30(interval)
It'll b gd if i can get help on that too..PLs help.Thanks alot for ur help.
Last edited by ITboy; Apr 15th, 2003 at 05:23 AM.
-
Apr 9th, 2003, 03:28 AM
#2
Firstly there's a "\" character missing from the path to your perl
program - is the extension correct here too?
Next up, the parameters argument is in bold below & comes
before the directory argument in the API call:
VB Code:
[color="#0000A0"]Dim[/color] strParams [color="#0000A0"]As[/color] [color="#0000A0"]String[/color]
strParams = text1.Text & "," & text2.Text [color="#00A000"]'etc[/color]
ShellExecute Me.hWnd, vbNullString, _
"c:[b]\[/b]windowsdesktopCreateActCreateActivity.pl", _
[b]strParams[/b], "C:\", CLng(1)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|