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
VISUAL INTERFACE DESIGN Instead of the graphic nature of the program, only the visualness of the inter action is important. The program must not focus on the GUI. On the other

I have all my program done except the loan part that I am having a lot of troubles with

This is a series of VBScript statements enclosed through the Function & End Function statements. A Function procedure is same to a Sub procedure, however can also return a value. T

How to Include List Box control in your project A list box is used for representing the users with a data. You can prefer the data from the list box for data entry. No editing

Dialog Based Application: (A) Dialog Based Application to demonstrate Animate Control: 1. Build a dialog based application. 2. Design the dialog as shown. 3. Place

Question 1 Write about the Visual Basic Application Development Life cycle with a sample Forms development for performing integer arithmetic operations Question 2 Discuss the

DDX - Dialog Data Exchange: The Data members can be related with specific controls in the dialog box. When the dialog box is displayed, the DDX will transfer the values into t


I have a project due tomorrow that I am really struggling in. Please help.

WINDOWS PROGRAMMING The Windows programming is a developing application using the C and the native Win32 application interface (API) or C++ and the class libraries like Microso