Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detect Object Data Type

Posted on 1999-07-13
5
Medium Priority
?
140 Views
Last Modified: 2010-05-02
If I have an object variable pointing to a textbox control, how can I tell from code, that my object variable is, indeed, point to a textbox vs. a listbox or something?

Is there a function to return the class type of a object variable?
0
Comment
Question by:lankford
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 2

Accepted Solution

by:
BeedleGuis earned 200 total points
ID: 1524389
if typeof objVariable is textbox then
   'Do somthing
else
   'it's not a textbox
end if
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524390
Correction.... TypeOf is one keyword


If typeof MyVariable is Textbox then
'' do somethin
end if
0
 

Author Comment

by:lankford
ID: 1524391
Thanks,

I don't know why I couldn't remember that.

lankford
0
 
LVL 2

Expert Comment

by:BeedleGuis
ID: 1524392
Jaysin28:
What are you correcting?  I don't see Type of anywhere on this Q
0
 
LVL 1

Expert Comment

by:Jaysin28
ID: 1524393
You answered the same time I did.  With the EXACT same text..  I was correcting my response which obviously didn't get posted.  Good answer, beedleguis..
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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 Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

661 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