From: anon1m0us@... Date: 2006-12-13T02:35:07+09:00 Subject: Re: Directory Size and bolding Excel cells I tried excel.Worksheets(x).Cells("A1:D1").Font.Bold=1 the (x) is a variable in a loop since I have numerous worksheets. I receive the following error: /test4.rb:17:in `method_missing': Cells (WIN32OLERuntimeError) OLE error code:80020005 in HRESULT error code:0x80020009 Exception occurred. from C:/test4.rb:17 from C:/test4.rb:15 mully wrote: > anon1m0us@yahoo.com wrote: > > > In addtion, how do you BOLD and hightlight and excel CELL?? > > Where ws is your Worksheet object and row and col are integers... > > ws.Cells(row, col).Font.Bold = 1 > ws.Cells(row, col).Interior.ColorIndex = 6 > > One of the best ways to determine the necessary Excel objects and > methods is to record a macro in Excel and then review the macro's VBA > code. > > Mully