Hello,
My vb app interacts with Excel spreadsheet and changes fore color
of some cells.
Is there any general method of restoring back black color to all the cells?
Jack
Chip Pearson - 23 Feb 2007 23:07 GMT
Try something like
Sub ColorAutomatic()
Dim WS As Excel.Worksheet
Set WS = XLApp.ActiveWorkbook.Worksheets("Sheet1")
WS.UsedRange.Font.ColorIndex = xlColorIndexAutomatic
End Sub
where XLApp is your Excel Application object.

Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
> Hello,
> My vb app interacts with Excel spreadsheet and changes fore
> color of some cells.
> Is there any general method of restoring back black color to all the
> cells?
> Jack
Earl Kiosterud - 23 Feb 2007 23:08 GMT
Jack,
Cells.Font.ColorIndex = 0

Signature
Earl Kiosterud
www.smokeylake.com
-----------------------------------------------------------------------
> Hello,
> My vb app interacts with Excel spreadsheet and changes fore color of some cells.
> Is there any general method of restoring back black color to all the cells?
> Jack