View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Autofit some columns

or

xlSheet.Columns.Autofit

--
Regards,
Tom Ogilvy

"Me" wrote in message
...
I found something:

xlsSheet.Columns("A:Z").AutoFit

A..Z is enough for me :)

Guy


"Me" лъб
...
Hi all.
I use VB6 to create an Excel file.
I have a Recordset that might have different amount of fields

(columns) -
depends on a query.
How do I fit all the columns with a loop ?
TIA
Guy