Ok, i want to use VbScript for Custom Commands, i know how to execute a code from the users's vbscript, but i dont know how to put arguments into it.
For example, i know how to execute the VbScript sub called
Blah()
But i do not know how to execute
Blah(blah, blah, blah)
Call Blah
he can help.
You have a couple options depending on whether it is a sub or a function returning a value, and if you want the value.
No paramters:
Blah
-or-
Call Blah
With paramters
Blah pOne, pTwo, pThree
-or-
Call Blah(pOne, pTwo, pThree)
-or to get return value if function-
lretval = Blah(pOne, pTwo, pThree)
HTH.
nm i found the problem, i was using executecode instead of run, grok you must have misunderstood my question im sorry i was being stupid, feel free to remove this topic
while were on the subject, say the script has a variable
like,
strName = "Noodlez"
how would you get the value of strName?
Do you mean when you declare the variable in the script, or have it hardcoded before runtime?
If you have put
Option Explicit
Dim strName
in the top of the form source, and some where in the form, you have put strName = "whatever here"
then if you want to get the value, you would need an object to get it with. for example,
textbox.text = strName
lol, hes referring to using the scripting control which is common VB code during runtime, not something hardcoded before runtime.
QuoteIf you have put
Option Explicit
Dim strName
in the top of the form source, and some where in the form, you have put strName = "whatever here"
then if you want to get the value, you would need an object to get it with. for example,
textbox.text = strName
not only is this not what im talking about, but it's incorrect. since when do you need an object to check the value of a string?