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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify if Cell Contents Fit

Status
Not open for further replies.

idbr

MIS
May 1, 2003
247
GB
Hi,

I'm trying to find out how to check if a cell is large enough to completely display its contents. If it's not I need to autofit the row, otherwise just set the row height to 18.

Can anyone help?

Thanks, Iain

 
Why not simply AutoFit ALL the rows ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV,

I'm listing out some jobs (in 10pt Arial) that need to be completed. For readability, I want to keep some space around the text so am resizing all rows to 18. Autofitting everything sets the height to 12.75.

Also for readability I want the whole row to display on screen at once. Each row has a simple description of the task to be completed and the majority of these are samll enough to fit into the assigned width. Some of them aren't though, typically %-(

Thanks, Iain
 
Ah, just realised - do it backwards:

rows.autofit

for i = 2 to n

if rowheight = 12.75 then

rowheight = 18

else

next n


Job done :)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top