Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

calling a procedure in vb.net

Posted on 2006-05-28
3
Medium Priority
?
139 Views
Last Modified: 2010-04-23
If I call the following procedure without passing the parameter, is it going to have True or False by default?

private sub booleanprocedure(byval mybooleanvalue as boolean)
...
...
end sub


private sub callthebooleanprocedure()
messagebox(me.booleanprocedure)
end sub



0
Comment
Question by:jskfan
2 Comments
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 375 total points
ID: 16779527
You are going to get a compiler error, since you have to specify the parameter when calling the method.

Bob
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 375 total points
ID: 16779676
You can make the parameter optional and set a default value like this:

    Private Sub booleanprocedure(Optional ByVal mybooleanvalue As Boolean = True)
        ...
    End Sub
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question