Variant type - visual basic, Visual Basic Programming

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

Posted Date: 10/9/2012 8:19:35 AM | Location : United States







Related Discussions:- Variant type - visual basic, Assignment Help, Ask Question on Variant type - visual basic, Get Answer, Expert's Help, Variant type - visual basic Discussions

Write discussion on Variant type - visual basic
Your posts are moderated
Related Questions
The body of variable or procedure name must use mixed case and complete as essential to define its purpose. Additionally, procedure names must begin with a verb, such as CloseDialo

CONTROL ARRAY The control array is a group of similar objects with similar name. Adding controls with control arrays uses less resource than simply adding the multiple controls

US WordPress Expert We are functioning on a software application based on WordPress (BuddyPress + Event Manager). Everything as far as functionality is done. Utmost of the styli

I was looking solution for assignment named Alamo Tour

write a XML with database with book details( book id, author ,subject, published year, vendor,price, language )

how to make dictionary in vb using ms access

The Select Case structure provides an option to If...Then...Else If for selectively executing one block of statements from amongst multiple blocks of statements. Any Select Case st

Visual Basic 1. What is the method of creating a new project in VB.SSS 2. Illustrate Code Editor Window and Solution Explorer. 3. Write a VB program to sort and display a

Tab Order: The tab order stands for the order in which the controls receive focus when the user clicks the tab key. The CTRL + D can be used to set the tab order of controls.

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