View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Excel Columns Autofix

With ETWS
If .Cells(j,i).ColumnWidth .Cells(1,i).ColumnWidth Then
.Cells(1,i).ColumnWidth = .Cells(j,i).ColumnWidth
End If
End With

--

HTH

RP
(remove nothere from the email address if mailing direct)


"WilliamMomo" wrote in message
...
I have 2 cells ETWS.Cells(j, i) & ETWS.Cells(1, i).

I compare the text width of this two cells, if cells(j,i) is larger than

the
(1,i) then the columns width of column i is equal to textwidth of

cells(j,i).

How can i do that ?