From: mully Date: 2006-12-13T03:10:07+09:00 Subject: Re: Directory Size and bolding Excel cells anon1m0us@yahoo.com wrote: > 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 > The 'Cells' method does not accept a range of cells as a parameter. If you're using a range, replace 'Cells' with 'Range'... excel.Worksheets(x).Range("A1:D1").Font.Bold=1 Mully