Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Me Me is offline
external usenet poster
 
Posts: 4
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
Me Me is offline
external usenet poster
 
Posts: 4
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofit Maxine Excel Discussion (Misc queries) 2 April 22nd 10 12:50 PM
Autofit (Columns.EntireColumn.AutoFit) does not work Michiel via OfficeKB.com Excel Discussion (Misc queries) 3 February 10th 09 05:29 PM
Autofit Columns falcios Excel Discussion (Misc queries) 2 February 17th 07 04:08 PM
autofit columns in pivot table Pastel Hughes Excel Discussion (Misc queries) 2 January 5th 06 10:27 PM
Columns.Autofit not doing what I want Ed Excel Programming 2 October 25th 04 11:31 PM


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"