calling a procedure in

Posted on 2006-05-28
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()
end sub

Question by:jskfan
    LVL 96

    Assisted Solution

    by:Bob Learned
    You are going to get a compiler error, since you have to specify the parameter when calling the method.

    LVL 85

    Accepted Solution

    You can make the parameter optional and set a default value like this:

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

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now