Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Determining control type

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gary Hillerson - 13 Mar 2006 18:41 GMT
Can I determine what type of control I've landed on from the control
itself?

e.g. can I have a function like the following?

Private Function GetControlType(ctrl as Control) as String
    if ctrl <is a textbox> Then
        GetControlType = "TextBox"
    ElseIf ctrl <is a checkbox> Then
        GetControlType = "CheckBox"
    ....
       
End Sub

Is there a property that reliably exists in every control that tells
me its type?

thanks,
  gary
Jezebel - 13 Mar 2006 22:19 GMT
If TypeOf ctrl is TextBox then
   ...

> Can I determine what type of control I've landed on from the control
> itself?
[quoted text clipped - 15 lines]
> thanks,
>   gary
Gary Hillerson - 14 Mar 2006 05:13 GMT
Thanks, Jezebel.

>If TypeOf ctrl is TextBox then
>    ...
[quoted text clipped - 18 lines]
>> thanks,
>>   gary
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.