Vibha
Vibha

Reputation: 31

Pass variables as parameters

Suppose I want to pass variables as my parameters, is it possible?

Example:

newva = 10 
obj = newobj.Run("%comspec% /c ruby E:\rubyfile.rb newva > D:\newdoc.txt", 1, true) 

Is this possible?

Upvotes: 0

Views: 135

Answers (1)

Ekkehard.Horner
Ekkehard.Horner

Reputation: 38775

Concatenate the variable's value into the command line:

obj = newobj.Run("%comspec% /c ruby E:\rubyfile.rb " & newva & " > D:\newdoc.txt", 1, true) 

(Still using the bad variable names?)

Upvotes: 1

Related Questions