how to Pass Optional Parameters in VBS? - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: how to Pass Optional Parameters in VBS? (/Thread-how-to-Pass-Optional-Parameters-in-VBS) |
how to Pass Optional Parameters in VBS? - ShrikantBiradar3449 - 04-06-2011 Hi, We can't use optional parameter in vbs like we can in VB as follow: Code: InsertRecord "Read" Please provide me an effective solution which will not lead to any major code change! I am having following option but avoiding because of the "scope" of variable declared for Optional parameter: Ex. Code: mymessage = "OPTIONAL" 'sDelimiter = | RE: how to Pass Optional Parameters in VBS? - Skepsis - 06-13-2011 Simple, use dictionaries from a string (example not functioning code) Code: call X("param1::value1^^param2::value2") make all passable parameters global ( not recomended ) Of cause how you break up the dict and return it I leave to you |