?
Solved

in excel can I "lock" the cell size ?

Posted on 2011-03-21
4
Medium Priority
?
318 Views
Last Modified: 2012-05-11
I am using a automatic script to move my mouse and click on stuff.

I need my excel cells to stay the same hight regardless of what stupid stuff I do to my spreadsheet.  

0
Comment
Question by:TIMFOX123
  • 2
4 Comments
 

Author Comment

by:TIMFOX123
ID: 35184258
Oh, I forgot  
excel 2k7
I just want to "lock" the hight of the cells
0
 
LVL 6

Accepted Solution

by:
TinTombStone earned 1000 total points
ID: 35184414
I dont know if there is a direct way of stopping the row height being changed, but this

Sheets("Sheet1").Rows.AutoFit

or

Sheets("Sheet1").Rows.RowHeight = 15

dropped into one of the worksheet or workbook events, perhaps Worksheet_Activate

will quickly resize them

Or you  could hide the row and column header completely, which makes it quite hard to resize them

    ActiveWindow.DisplayHeadings = False

0
 
LVL 59

Assisted Solution

by:Chris Bottomley
Chris Bottomley earned 1000 total points
ID: 35184539
Lock it ... not particularly well but with some VBA we can force it back!

The change event handler for the sheet as below resets the row to a fixed value ... 22.5 for example with every change.

As you can see it is applied to row 6 but this is adaptable as required.

Chris
Private Sub Worksheet_Change(ByVal Target As Range)
    Me.Rows(6).RowHeight = 22.5
End Sub

Open in new window

0
 

Author Closing Comment

by:TIMFOX123
ID: 35185831
this will do it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question