Use VBA to change row height or width??

  • Thread starter Thread starter Robert Crandal
  • Start date Start date
R

Robert Crandal

I know how to change the width of a column by using the
following code:

Columns(1).ColumnWidth = 14

The problem is that I can't seem to find an equivalent
way to change the dimension of a row. Is there
an equivalent Rows() object that I can use in a similar manner?

thankx
 
I'm referring to the letters/numbers on the top and left edge of the
worksheet.

Run this code somewhere in a VBA module:

Rows(1).RowHeight = 30

Now, on the menu bar click Tools>Options>View>Row and Column Headers.
In my version of Excel it won't let me "uncheck" the option that says
"Headings" to off the row or column headings.

Does anybody know what's going on here?
 
Robert, is this what you want?

ActiveWindow.DisplayHeadings = Not ActiveWindow.DisplayHeadings

Toggles the row/column headers


HTH
Peter
 
Ya, that's perfect. I just dont understand why Excel wont let me
uncheck the "Headings" box normally after I run the following
code:

Rows(1).RowHeight = 30

Maybe it's an Excel bug or something???
 
Back
Top