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

Variable length strings, Variable Length Strings: The Strings can be de...

Variable Length Strings: The Strings can be declared using As or $ as shown in the code below; the msg and msg1 are the two strings and they are assigned the values using '='.

Properties of object method, Properties: VBScript Err Object ...

Properties: VBScript Err Object   Properties   Description   D escription Property The descriptive string related

Data types, what are the basic vb data types

what are the basic vb data types

Program to draw a rectangle shape , Create a project that draw a rectangle ...

Create a project that draw a rectangle shape which may be either (*) or (+) according to the selected radio button. The number of rows in the shape will be taken from the 1 st

Employee data part 3, create an application that performs the following ope...

create an application that performs the following operation with the employee file created by the application in programming challenge 1: uses an open dialog box to allow the user

Error handling in vbscript, While a run-time error takes place, the propert...

While a run-time error takes place, the properties of the Err object are filled with information which uniquely identifies the error & information which can be used to handle it. I

Change calculator, how do i create a change calculator that gives the denom...

how do i create a change calculator that gives the denominations of coins for an amount of change up to .99 cents

Features of user interface design, FEATURES OF USER INTERFACE DESIGN Th...

FEATURES OF USER INTERFACE DESIGN The features like how will the software's are used? Who will be the users? What will be the life of the software? During its lifetime how ofte

Wage calculator and ta calculations, ( Wage Calculator with Tax Calculation...

( Wage Calculator with Tax Calculations) Develop an application that calculates an employee’s earnings, as shown in Fig. 4.23. The user should provide the hourly wage and number of

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