Hi All
Greetings. The version that I have writtin using LISTVIEW is working very well. I have another interesting problem which is beyong my knowledge. I have been asked to display in the Excel Cell forecolor in RED and not the backcolor if the exported data from ACCESS Sales Table whose sales value did not meet certain value.

this script is not working:
objWorksheet.Cells(intRow, intCol).Fill.Schemecolor = vbRed

Here is part of the overall VB6 script that I have written
Do Until .EOF
intCol = 0
intRow = intRow + 1
For i = 0 To (.Fields.Count - 1) Step 1
intCol = intCol + 1

objWorksheet.Cells(intRow, intCol) = .Fields(i).Value

If .Fields("SalesAmt").Value < 500 Then
objWorksheet.Cells(intRow, intCol).Fill.Schemecolor = VbRed
End If

.MoveNext
Loop

08-17-2008, 02:24 AM

Phil Weber

Excel's macro recorder is your friend. Begin recording a macro, then manually perform the action(s) you wish to automate -- in this case, changing the forecolor of a cell -- then look at the code that was recorded. Try this: