Jinky Julie
10-02-2009, 08:05 AM
Hi all...
I would like to test a cell's contents and highlight the cell if it fails...
Stumbling block is the info in the cell is an "elapsed time". (e.g. 2:48)
This is what I've started with... I know it doesn't work... Just want to illustrate where I want to go...
Dim oTable As Table
Dim etRng As Date
Set oTable = ActiveDocument.Tables(1)
With oTable
Set etRng = .Cell(3, 2).Range
If etRng < 2:20 Then etRng.Shading.BackgroundPatternColor =_ wdColorYellow
End With
I missing something (simple I'm sure)... I've tried CDate and a little "formula" I had used before... but it's just not working...
Suggestions... pushes.... etc... would be appreciated....
JJ
I would like to test a cell's contents and highlight the cell if it fails...
Stumbling block is the info in the cell is an "elapsed time". (e.g. 2:48)
This is what I've started with... I know it doesn't work... Just want to illustrate where I want to go...
Dim oTable As Table
Dim etRng As Date
Set oTable = ActiveDocument.Tables(1)
With oTable
Set etRng = .Cell(3, 2).Range
If etRng < 2:20 Then etRng.Shading.BackgroundPatternColor =_ wdColorYellow
End With
I missing something (simple I'm sure)... I've tried CDate and a little "formula" I had used before... but it's just not working...
Suggestions... pushes.... etc... would be appreciated....
JJ