![]() |
|
#1
|
|||
|
|||
|
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Dim oSchoolWorkTable As ListObject, sSchoolWorkTable As String
Set oSchoolWorkTable = ListObjects("SchoolWorkTable")
sSchoolWorkTable = oSchoolWorkTable.Name & "[#This Row]"
With oSchoolWorkTable.ListColumns("Name").Range.FormatConditions _
'''
.Add(xlExpression, Formula1:="=COUNTIF(INDIRECT("" & sSchoolWorkTable & ""),FALSE)>0")
'''
.Interior.Color = RGB(255, 199, 206)
.Font.Color = RGB(156, 0, 6)
End With
Application.EnableEvents = True
End Sub
Thank you. |
|
#2
|
|||
|
|||
|
I've resolved it myself.
|
|
#3
|
|||
|
|||
|
I've resolved it myself.
Code:
Dim sIndirect As String
sIndirect = "INDIRECT(""" & oSchoolWorkTable.Name & "[#This Row]"")"
With oSchoolWorkTable.ListColumns("Name").Range.FormatConditions _
.Add(xlExpression, Formula1:="=COUNTIF(" & sIndirect & ",FALSE)>0")
End With
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Get and pass name of clicked ActiveX check box
|
NobodysPerfect | Excel Programming | 17 | 06-04-2014 06:20 AM |
How to Pass Document to this Sub
|
ilcaa72 | Word VBA | 1 | 01-28-2014 03:04 PM |
Can pass .expression as a parameter?
|
tinfanide | PowerPoint | 4 | 12-28-2012 06:14 PM |
| How to pass parameters to a .msg file? | HereNow | Outlook | 0 | 11-05-2012 10:38 AM |
| Office 2010 Excel Full pass | raineraus | Excel | 1 | 09-19-2012 12:55 PM |