Variant type - visual basic, Visual Basic Programming

Assignment Help:

Variant Type:

If no data type is related with the VB variables, it takes the default variant type. The variable x will be of the variant type when the two declarations below are used.

Dim x

Dim x as Variant

A variant type can take string, numeric, date, null or Boolean values.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As

Single)

Dim i As Integer

Dim j As Long

Dim a As Single

Dim b As Double

Dim c As Single

Dim c1 As Currency

i = 32767 ' range is upto 32767 beyond that overflow occurs

j = 97400

Form1.Print "integer i is"; i

Form1.Print "long j is"; j

a = 8.97655467787088 '8.976555

b = 0.876554677870879

c = 100000000 '1E+08

c1 = 100000000

Form1.Print "single a is"; a

Form1.Print "double b is"; b

Form1.Print "single c is"; c

Form1.Print "currency c1 is"; c1

End Sub


Related Discussions:- Variant type - visual basic

Do while loop statement, Do While Loop Statement : The statements conta...

Do While Loop Statement : The statements contained by the do...while loop block executes till the condition given in the while is true. The working of do...loop is elaborate

Looping, how to make logic of o program and how to use loop

how to make logic of o program and how to use loop

For loop visual basic program, Write Visual Basic programs for the followin...

Write Visual Basic programs for the following: 1.     Write a program that uses a "For Loop" to generate a list of temperature conversions in one degree increments from a given

Dialog - database applications, DIALOG   The dialog is a window which ...

DIALOG   The dialog is a window which contains controls. The Dialog boxes are the form of input and output. The control can be placed on the dialog box for communicating. If y

We are need of vb.net dynamically created gridview, We are need of VB.NET D...

We are need of VB.NET Dynamically Created Gridview with Textboxes, DDLs Utilizing VB code in ASP.NET I dynamically create a calendar showing either 3 or 6 or 9 or 12 months, dep

Software that is rude - basics of gui design, Software That Is Rude: T...

Software That Is Rude: The software warns the user for making the mistakes. The Message boxes pop up representing the mistake and the user will have to click the OK or CANCEL

Input box - dialogue box in visual basic , Input Box: To demonstrate t...

Input Box: To demonstrate the use of the Input Box as shown in figure. Now consider the illustration shown below: 1. Initiate a new project 2. Select the standard exe

Objective of vb script, The objective of this unit is to describe the basic...

The objective of this unit is to describe the basics of VBScript. After completing this unit, you will be capable to write code for Web pages via VBScript. You will be able to unde

Web Scraping via program, I''m trying to create a program in VB.net that wi...

I''m trying to create a program in VB.net that will basically load the page within itself and allow you to input data via the program rather than going to the actual site using you

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd