ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Autofit some columns (https://www.excelbanter.com/excel-programming/323636-autofit-some-columns.html)

Me

Autofit some columns
 
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



Me

Autofit some columns
 
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




Tom Ogilvy

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







All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com