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
In VBScript, the While...Wend statement is provided for those who are familiar along its usage. However, due to the lack of flexibility in While...Wend, it is suggested that you us

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

Retrieval Methods: There are 3 ways to find a document. The primary method is a positional retrieval. This is achieved by keeping in mind where you left it. The next method is

Create the flowcharts using MS Visio, MS Excel or MS Word to demonstrate the algorithm. Submit your flowchart under the assignment for CH7-4-26 Flowchart. Part Printouts H

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 a

ToolTip: The ToolTip property is used to flash a message regarding a control object when the mouse pointer moves over that object for a couple of seconds. Pick a control and c

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

Steps for Creating A MDI Form: 1. Build a new form and set IsMdiContainer property to true. 2. Build a child form class to add to the form. 3. Now Right click the proj

how to add the hangman images

Sets or returns wholly qualified path to a Help File. If Help file is indicated in HelpFile, it is called automatically when the user clicks Help button (or presses the F1 key) in