Solved

Variant Data Type...

Posted on 2000-03-18
4
226 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

760 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

21 Experts available now in Live!

Get 1:1 Help Now