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 Refresh Method: The refresh method transfer to the first record in the record set. To invoke the refresh method follow the syntax which is as shown below: Form1.Data1.R

Event-Driven Programming: The Event-driven programming allows the program to react to various inputs or events.   The action on a graphical component is an event. For il

what mean by programing


what are the things that information system can do and their limitations?

Message Handling: 1. The message is send to the window. And it is sent to the Window Procedure. 2. The message map holds all the message handlers. 3. The window procedur

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

For naming anything variable names follow the standard rules in VBScript. A variable name: Should begin with an alphabetic character. Cannot have an embedded period. Sh

For ..... Next Repetition Statement: To demonstrate the working of for .. next control statement, put a command button and a label control on the form. The Handle clicks the e

DYNAMIC LINK LIBRARY - DLL   The DLL are files which can be called when required by the other program that is running in the computer. The DLL files which support the specific