Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old December 24th 06, 11:43 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Dec 2006
Posts: 92
Default How to prevent the auto resizing of a column (ie, lock the width)

Interested in keeping the colmns from resizing as it does automatically when
data entered overflows the current set width. Spreadsheet is being used by
partially disabled (parkinsons disease) individual - mistakes include holding
down number key too long throwing it into repeating mode. She hits <enter
key rather than <esc key and, wa-la, the column expands. Deleting the entry
does not restore the width and so the spread becomes difficult to work with.

  #2   Report Post  
Old December 25th 06, 01:50 PM posted to microsoft.public.excel.misc
D. D. is offline
external usenet poster
 
First recorded activity by ExcelBanter: Sep 2006
Posts: 53
Default How to prevent the auto resizing of a column (ie, lock the width)


A code like this will keep the column width, each time you activate the
sheet with the code , this code would go into the worksheet module, try
copying this code the go to excel and right click on sheet1 tab, view
codes, paste this code,
exit from VBA and go to sheet two, then go back to sheet one and and
the columns should have there set widths

Private Sub Worksheet_Activate()
Columns("E:E").ColumnWidth = 12
Columns("G:G").ColumnWidth = 12

End Sub



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
Lookup function/sum function Secret Squirrel Excel Discussion (Misc queries) 24 November 21st 06 01:46 AM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Column character width on auto filter Floyd III Excel Discussion (Misc queries) 2 January 7th 05 01:59 AM
Change the width of a single column in a column chart Dave Charts and Charting in Excel 2 December 13th 04 07:25 PM


All times are GMT +1. The time now is 07:46 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017