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: 7
Default Column Autofit Problem

I have the code below in as a worksheet procedure to automatically change
the column width to accomodate entries. It works fine Excel 2002 but when a
friend tried it in Excel 97 it would not work. Is this an Excel 97 feature
or does this code need to be written a different way to cover versions 97 to
2002. I would really value any help.

Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect
With ActiveSheet.Range("B12:Q30")
..Columns.AutoFit
End With
ActiveSheet.Protect
End Sub

Kind Regards
Graham Haughs
Turriff, Scotland


 
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
Column Autofit mcolson Excel Discussion (Misc queries) 2 March 6th 08 10:19 PM
how to autofit column widths brew2u New Users to Excel 1 October 31st 07 11:21 AM
autofit row problem joeeng Excel Discussion (Misc queries) 1 July 25th 05 06:10 PM
Row Autofit problem Excel 2003 Matthias Klaey Excel Discussion (Misc queries) 0 January 19th 05 05:33 PM
Row Autofit Problem Peter Graff Excel Discussion (Misc queries) 3 January 18th 05 10:10 PM


All times are GMT +1. The time now is 12:31 AM.

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"