Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatic adjustment of Cell height?

Hi,

I'm using automation to start Excel and fill some columns with data. Once
of the columns has quite a bit of text in some of the cells while some only
have few lines.

I've set TextWrap=.t. for each Cell, but it doesn't adjust the height. Is
there an excel property that I can call to do this automatcially, or some
other way of working out how high each cell should be sized.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Automatic adjustment of Cell height?

If I were doing it in excel, I'd use something like:

activesheet.rows(35).autofit
(to set a specific row)

or
activesheet.rows.autofit
(to do all of them)

or
activesheet.range("a1:A99").entirerow.autofit
(to get a range of rows




Tristan wrote:

Hi,

I'm using automation to start Excel and fill some columns with data. Once
of the columns has quite a bit of text in some of the cells while some only
have few lines.

I've set TextWrap=.t. for each Cell, but it doesn't adjust the height. Is
there an excel property that I can call to do this automatcially, or some
other way of working out how high each cell should be sized.

Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatic adjustment of Cell height?

This is my code:

SELECT QResults
SCAN
WITH oRange
..Columns[1].Value=QResults.wrkovertm
..Columns[2].Value=QResults.wrkdate
..Columns[3].Value=QResults.wrkbilling
..Columns[4].Value=ALLTRIM(QResults.wrkdesc)
..Columns[4].WrapText = .T.
..Columns[4].VerticalAlignment = -4160
..Columns[4].autofit
..Columns[5].Value=QResults.staffnm
Endwith


* Move range down one row
oRange = oRange.Offset(1,0)


Endscan

I added the autofit in the above code, and all it did was make each cell
exactly the same size. So if there is 2 lines of text in them, the hight
has been made so large that it shows about 10 more lines of extra white
space underneath the text.

Maybe I didn't do it right?

Thanks for your help



"Dave Peterson" wrote in message
...
If I were doing it in excel, I'd use something like:

activesheet.rows(35).autofit
(to set a specific row)

or
activesheet.rows.autofit
(to do all of them)

or
activesheet.range("a1:A99").entirerow.autofit
(to get a range of rows




Tristan wrote:

Hi,

I'm using automation to start Excel and fill some columns with data.
Once
of the columns has quite a bit of text in some of the cells while some
only
have few lines.

I've set TextWrap=.t. for each Cell, but it doesn't adjust the height.
Is
there an excel property that I can call to do this automatcially, or some
other way of working out how high each cell should be sized.

Thanks


--

Dave Peterson



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
Row height adjustment after sort Leroy Syrop Excel Discussion (Misc queries) 2 February 11th 10 12:31 AM
Row Height Adjustment on data Imported into excel Lisa Excel Worksheet Functions 1 September 23rd 09 12:39 AM
Auto Cell Height Adjustment for text entered Solex Excel Discussion (Misc queries) 3 June 19th 09 01:18 PM
ROW HEIGHT ADJUSTMENT IN PIVOT TABLES d-mitt Excel Discussion (Misc queries) 0 April 26th 08 04:32 AM
Automatic row height adjustment nsv Excel Discussion (Misc queries) 5 January 27th 06 07:38 AM


All times are GMT +1. The time now is 05:32 PM.

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

About Us

"It's about Microsoft Excel"