LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Automatically change column widths?

See John Walkenbach's site for undo.

http://www.j-walk.com/ss/excel/tips/tip23.htm


Gord Dibben MS Excel MVP

On Thu, 19 Jul 2007 18:54:00 -0700, Ross wrote:

Hi everyone.

I am using code from a previous post by Mike H. that automatically fits the
cell as you tab or enter out of it. I am wondering if anyone knows how to
write it so that the 'Undo' button will still be available after leaving the
cell. Sometimes I decide that the previous cell amount was the correct one
after all, but can't use 'Undo' to fix it.

The code from Mike H is:

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:IV65536")) Is Nothing Then
Target.EntireColumn.AutoFit
End If
End Sub

Please and 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
Why do column widths change in Excell? JPEgan Excel Worksheet Functions 1 January 13th 07 07:08 PM
Automatically adjust column widths stu_padassol Excel Discussion (Misc queries) 1 July 27th 06 08:13 AM
Need to change column widths in middle of page. cruz2man Excel Discussion (Misc queries) 1 May 19th 06 04:11 AM
How to change column letters to correct ones in many formulas automatically? Dmitry Kopnichev Excel Worksheet Functions 7 October 13th 05 09:52 PM
Column widths to adjust automatically? lambola Excel Discussion (Misc queries) 1 January 21st 05 12:35 AM


All times are GMT +1. The time now is 07:29 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"