Home > Cannot Use > Cannot Use Parentheses When Calling A Sub In Qtp

Cannot Use Parentheses When Calling A Sub In Qtp


Even with the many other language options out there, somehow VBScript still gets it's hooks into the developer's world. Moderator @ WebDeveloper.com Reply With Quote 02-08-2012,02:23 PM #2 yamaharuss View Profile View Forum Posts Visit Homepage V8 Rider Join Date Jan 2008 Location Florida Posts 1,227 http://blogs.msdn.com/b/ericlippert/.../15/52996.aspx Internet Design Concepts Then why does this work? For example… 'Arg1 is passed ByRef, Arg2 is passed ByVal. have a peek here

Please check your email and confirm free subscription! 3 Comments Olga on November 25, 2014 at 18:37 You can call function in this way: twoarguments (10),(20) It means that you call I do have a new problem which i will post about #7 Online Bookmarks Sharing: Jump to: Jump to - - - - - - - - - - [Welcome] THANKS !!!! I tell people that the error means that you CANNOT use PARENTHESES when CALLING a SUB -- which word didn't you understand? https://blogs.msdn.microsoft.com/ericlippert/2003/09/15/what-do-you-mean-cannot-use-parentheses/

Cannot Use Parentheses When Calling A Sub In Qtp

Thank you so much for it. Advanced Search Forum Server-Side Development ASP Cannot use parentheses when calling a Sub If this is your first visit, be sure to check out the FAQ by clicking the link above. As a guest, you can read any forum posting.

Does this mean, i have to split the 2 behaviors into 2 functions, if i have to call the Sub with 2 parameters? Are you aComputer / IT professional?Join Tek-Tips Forums! Can anyone please help? 800a0414 Close this window and log in.

Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. Cannot Use Parentheses When Calling A Sub Msgbox If their is a easier way please let me know. Read more about him. http://stackoverflow.com/questions/17945213/cant-use-parentheses-when-calling-a-sub-vbscript Here's the deal: parentheses mean several different things in VB and hence in VBScript.

I have set a variable to a 'string': strCol3 = "The All Blacks gratest rugby team in th world's" This variable is passed into the function, the function gets called: tweakText(strCol3) Expected End Of Statement The VBScript syntax and semantics were designed for compatibility with VB6. Or is there something I'm missing with the no arguments scenario? Are you sure you are on the right side?

Cannot Use Parentheses When Calling A Sub Msgbox

Reply all says: November 30, 2009 at 9:51 pm how to write this? other Thx Reply Muzi says: August 16, 2012 at 9:44 pm thanks for this post. Cannot Use Parentheses When Calling A Sub In Qtp COM supports passing variable references around, but unfortunately the intersection of early-bound COM and late-bound IDispatch is a little bit goofy. Cannot Use Parentheses When Calling A Sub Replace Last edited by fredmv; 02-08-2012 at 01:39 PM.

after I fixed all 8 pages with this… they all started working, no errors. navigate here Advanced Search VBForums Visual Basic ASP, VB Script *RESOLVED* VBS:"Cannot use parentheses when calling a Sub" If this is your first visit, be sure to check out the FAQ by clicking Posts: 1,868 Thanks: 12 Thanked 20 Times in 20 Posts Adam H-W Post your code, if possible indicating which line number. Since the comma tells VBSCRIPT where the next argument is, and it is expecting a parenthesis before the comma, it puts two and two together and tells you you can't use Cannot Use Parentheses When Calling A Sub Asp

To start viewing messages, select the forum that you want to visit from the selection below. However, every time I try to make the call, I get the following error: Code: Microsoft VBScript compilation error '800a0414' Cannot use parentheses when calling a Sub /datetest.asp, line 31 UpdateContactBK(StrContactNo,ObjTrack,pd(DAY(date()),2) For example: Call MySub(MyArg) If the above two rules do not apply, then the list must not be surrounded by parentheses. http://homeshareware.com/cannot-use/cannot-use-parentheses-when-calling-a-sub-msgbox.html Welcome to the p2p.wrox.com Forums.

Worked for me. Vbscript Function Return RE: Cannot use parentheses when calling a Sub QatQat (IS/IT--Management) 4 Apr 06 04:13 response.write replace(objRS("FirstName"), ",", "") & " " & replace(objRS("LastName"), ",", "")this does the job.cheersQatQat Life is what Every time I get that message, I remove the parens from the function call and it works like a champ.


Consider this gem… Sub MySub(ByRef Parameter) … End Sub Parameter is passed by value. Result = MyFunction(Arg1, (Arg2)) And, there are additional rules that apply when calling a function or subroutine… An argument list for a function call with an assignment to the returned value Here is a part of script - what is wrong? Vbs Object Required Reply Submit a Comment Cancel replyYour email address will not be published.

What is the total sum of the cardinalities of all subsets of a set? Basically, when you use a procedure or function like this: Foobar arg1, arg2, arg3 you must not use parentheses around the argument list. All Forums >> [Scripting] >> WSH & Client Side VBScript Forum MenuLog inRegistration / Sign up RSS FeedThread Options View Printable PageThread Reading Mode Cannot use parentheses when calling a this contact form Reply Eric Lippert says: September 16, 2003 at 7:24 pm I live to serve!

Online UFT (QTP) Training Turbo start your UFT learning by joining our renowned online UFT/QTP training course. vbscript parentheses share|improve this question asked Jul 30 '13 at 10:59 Neta 3731419 1 see stackoverflow.com/a/13622374/603855 –Ekkehard.Horner Jul 30 '13 at 11:34 Saw that, didn't quite understand what Reply Eric Lippert says: June 28, 2006 at 4:21 pm Yes, the syntax is the same for VB6/VBA. You Should Read These 3 Related Articles Too!VB Script and QTP - Part3HP QTP Quiz: Passing by value vs Passing by referenceHow to load a DLL with QTP?Welcome new readers: Download

Good analysis.

Back to Top