Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Highlighting the cell in Excel!
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
I tried with the code below,
Code:
Public Function Highlight_Cell()
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set ObjWorkBook = objExcel.Workbooks.open (DataSheet_Path &"\" &  "DWU.xls")
   Set ObjWorkSheet = ObjWorkbook.WorkSheets("DS_Result")
    For Each Cell In ObjWorkSheet.UsedRange
    If Cell.Value = "False" Then
      Cell.Interior.ColorIndex = 3
     End If
  Next
ObjWorkBook.Save
ObjWorkBook.close
Set objExcel = nothing
End Function

It works fine for me.
Reply


Messages In This Thread
Highlighting the cell in Excel! - by nageshpv - 08-18-2008, 05:08 PM
RE: Highlighting the cell in Excel! - by Rekha - 08-19-2008, 04:31 PM
RE: Highlighting the cell in Excel! - by nageshpv - 08-19-2008, 06:07 PM
RE: Highlighting the cell in Excel! - by nageshpv - 08-19-2008, 06:11 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)