Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Rowheight in Excel using VB

Status
Not open for further replies.

MikeBronner

Programmer
May 9, 2001
756
US
I would like to set the rowheight of the currently selected cell using VB.

I tried the following:

activecell.rowheight = 12.5

However, I get an error when trying this: "Runtime Error '1004': Unable to set the RowHeight property of the range class."

When I ran this under Excel 2000, it worked like a charm. However, in Excel 97 it busted and came up with that stupid error message.

Is there a work-around for this issue?

Thanks! ;-> Take Care,
Mike
 
This works in X97
Selection.RowHeight = 12.5

See if it works in X2000
 
I found out what my problem was: I only had ne cell selected, when I needed to select the entire row. It works in Excel 2000 to only select one cell, but Excel97 requires you select the entire row.
Thanks :) Take Care,
Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top