Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
8th Edition
ISBN: 9781337102124
Author: Diane Zak
Publisher: Cengage Learning
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 3, Problem 1MQ8

Explanation of Solution

Statement used to declare a procedure-level variable:

'This program demonstrates how to declare a procedure-level 'named constant and assign the value on it.

Public Class frmMain

Double click the “Display” button and add the following code in the code editor window:

Private Sub btnDislpay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDislpay.Click

The “Display” button click event declares the procedure level variables.

'Declare the procedure-level named constant 'variable and assign a value as 10.5.

        Const decPAY As Decimal = 10.5D

The message box displays the named constant variable value.

           MessageBox...

Blurred answer
Students have asked these similar questions
Which of the following statements declares a procedure-level variable that is removed from the computer’s memory when the procedure ends? a. Const intCounter As Integer b. Dim intCounter As Integer c. Local intCounter As Integer d. Static intCounter As Integer
Write an expression that multiplies the value stored in the dblTotal variable by 15%.
Write a statement that assigns the number 2.5 to the dblNum variable.

Chapter 3 Solutions

Programming with Microsoft Visual Basic 2017

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning