*... With oExcel.ActiveWorkbook.ActiveSheet.UsedRange With .Rows(1) For ix=1 to .Columns.Count .Cells(1,m.ix).Value = Upper(.Cells(1,m.ix).Value) endfor .Interior.ColorIndex = 3 .Font.Color = Rgb(255,255,255) Endwith .Columns.Autofit Endwith *...PS: I don't want to end up writing all of your code.