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. |
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 |
All times are GMT +1. The time now is 05:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com