View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default ActiveWindow.VisibleRange.Width - Is this the correct code

No. Try the following (no guarantees!) instead of 8 in your denominator:

(Columns("P:P").Width / Columns("P:P").ColumnWidth)

--

Vasant


"StevenS" wrote in message
...
Is this the correct code to size a cell to the size of a users screen no
matter what the size
'eg
Columns("p:p").ColumnWidth = ActiveWindow.VisibleRange.Width / 8 (8 =
factor
to convert to pixels)
--
SS