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 / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Controls Name value not typename query

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rob W - 02 Dec 2007 16:53 GMT
Greetings

I have the code below where I would like ALL but ONE of fields to have the
text set to BLANK and made visible.

How can I add a statement to only set X.Text and X.visible values if it isnt
ME.combopatient??

I've look at the functions under controls and can see how I can directly
access the control name.

For Each X In Me.Controls

If TypeName(X) = "TextBox" Or TypeName(X) = "ComboBox" Then

          'If not comboPatient then do the following ...
           X.Text = ""
           X.Visible = False
       Else
           comboPatient.Enabled = True
       End If

   ElseIf TypeName(X) = "Label" Then
       lblDateRegistered.Caption = ""
   End If
Next

Thanks
Rob W
Jim Rech - 02 Dec 2007 18:28 GMT
If X.Name <> "comboPatient" Then

Signature

Jim

> Greetings
>
[quoted text clipped - 25 lines]
> Thanks
> Rob W
Rob W - 02 Dec 2007 19:53 GMT
Thanks. Works great
> If X.Name <> "comboPatient" Then
>
[quoted text clipped - 27 lines]
>> Thanks
>> Rob W
 
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.