Microsoft
Software
Hardware
Network
Question : pass array as a param from a vb script to an exe file URGENT HELP PLEASE...
Experts,
Below is the code i have. The objective is to submit a few fields on an html form, and onclick event of submit button, call the sub procedure in the vbscript...load the array up and pass that array to an exe (written in vb). I am getting error when I open the html.
<html>
<head>
<script language="VBScript">
Sub ProcessPayroll()
Dim myArray(5)
myArray(0)=(Document.form1
.Name.Valu
e)
myArray(1)=int(Document.fo
rm1.Age.Va
lue)
myArray(2)=(Document.form1
.Address.V
alue)
myArray(3)=(Document.form1
.Designati
on.Value)
Dim objShell
Dim cmdParam
cmdParam = Join(myArray, Space$(1)) ' <<<< Erroring at this point
Set objShell = CreateObject ("WScript.Shell")
objShell.Run "D:\ExcelOperations.exe " & cmdParam
End Sub
</script>
<body>
<form name="form1" >
</form>
</body>
</html>
</head>
--------------------------
----------
----------
-----
The code for the exe...
Public Sub Main()
Dim cmdArgs() As String
Dim i As Long
cmdArgs() = Split(Command$, Space$(1))
For i = LBound(cmdArgs) To UBound(cmdArgs)
MsgBox "Array items: " & cmdArgs(i)
Next i
End Sub
Answer : pass array as a param from a vb script to an exe file URGENT HELP PLEASE...
I was able to fix the problem by myself... somehow HTML/VB Script does not like the "$" symbol... removing it fixed the issue....
Random Solutions
Ubuntu 10.04 startup script
ASP.NET How to get picture images to display...in a LISTVIEW?
asp.net: how would you insert the address 'location' into this hyperlink control
Sync Issues” and “Local Failures make the OST size more than 6 GB
Example on How to use AddPrinterDriver or AddPrinterDriverEx with C#?
Problem getting page with CURL and PHP
how to parse this text log into another txt format
Does anyone know FBML or the basics of developing a FB app?
pivot table table problem...
DCDIAG DC ERRORS