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 / Programming / June 2006

Tip: Looking for answers? Try searching our database.

Last needed info (validation)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Turquoise_dax - 22 Jun 2006 17:20 GMT
Here is the code with the missing link!
What I want to do is activate a validation list (Named "Comply") in
every cell to the right of a cell containing "I" in the B column...

Anyone knows what goes in the (...)?

Dim cell As Range
For Each cell In Range("B:B")
If cell = "I" Then cell.Offset(0, 1).(....)
Next

Signature

Turquoise_dax

Bob Phillips - 22 Jun 2006 18:11 GMT
Dim cell As Range
   For Each cell In Range("B:B")
       If cell = "I" Then
           With cell.Offset(0, 1)
               On Error Resume Next
               .Validation.Delete
               On Error GoTo 0
               .Validation.Add Type:=xlValidateList, _
                               AlertStyle:=xlValidAlertStop, _
                               Formula1:="=Comply"
           End With
       End If
   Next cell

Signature

HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

> Here is the code with the missing link!
> What I want to do is activate a validation list (Named "Comply") in
[quoted text clipped - 6 lines]
> If cell = "I" Then cell.Offset(0, 1).(....)
> Next
 
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.