LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Autofit

Hi,

I have this aotufit command but it doesn't really work.

Sub col()

On Error Resume Next
'For Each ws In Workbooks("bbl.xls").Sheets


For Each Sh In Workbooks("bbl.xls")
Columns("A:A").Select
Range(Selection, Selection.End(xlToRight)).Select
Columns.AutoFit
'ActiveSheet.ActivateNext

Next

End Sub


I am trying to make an automatic "autofit" to each of the tabs in a
workbook irregardless of the tab name and number of column in each of
the tab.

Can I have a command that can work? Thank you.

 
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 Elena Excel Programming 3 May 22nd 06 05:48 PM
AutoFit TanahAirShah Excel Programming 1 January 16th 04 10:04 PM
row autofit Robin Hammond Excel Programming 0 September 6th 03 02:33 AM


All times are GMT +1. The time now is 03:16 PM.

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

About Us

"It's about Microsoft Excel"