Solved

Variant Data Type...

Posted on 2000-03-18
4
229 Views
Last Modified: 2010-05-02
Which function should be used to find out the value in a variant data type is being stored internally ?

1) TypeOf
2)DataType
3)VarType
4)ObjectType

Thanks,
bhavesh
0
Comment
Question by:bhavesh55
  • 2
4 Comments
 
LVL 14

Expert Comment

by:mcrider
ID: 2631736
Stop asking test questions!

To everyone else... This guy graded my last CORRECT answer as a "D"... Don't let him bring your grade average down...
0
 
LVL 9

Expert Comment

by:Ruchi
ID: 2631817
Why D?
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2631835
Because testboy has no sense of humor at all... A "D" isn't worth the 5 points... If he graded it at all...

bhavesh55's grade ratio:  14 / 28
0
 
LVL 1

Accepted Solution

by:
mr_krishna earned 5 total points
ID: 2646858
Use VarType function to get the value of a data type.

This example uses the VarType function to determine the subtype of a variable.

Dim IntVar, StrVar, DateVar, MyCheck
' Initialize variables.
IntVar = 459: StrVar = "Hello World": DateVar = #2/12/69#
MyCheck = VarType(IntVar)   ' Returns 2.
MyCheck = VarType(DateVar)   ' Returns 7.
MyCheck = VarType(StrVar)   ' Returns 8.

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now