Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to Use AutoFit()

I need to put a long string into a cell but i want it shown in a proper way
so that the user can see the whole content with proper width and height. Can
I use AutoFit() to adjust individual cell width and height? How can I do
that?

excelresultsheet.Cells(i+1,j+1).value=value[j];

As you can see, excelresultsheet is a worksheet type and value[j] are a long
string. I am using Java Script. Thanks a lot.

Weide
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default How to Use AutoFit()

you can do rows and columns,

With Rows(1)
.HorizontalAlignment = xlCenter
.Font.Size = 8.5
.AutoFit
End With

and

With Columns("E:F")
.AutoFit
End With

--


Gary


"Weide Zhang" wrote in message
...
I need to put a long string into a cell but i want it shown in a proper way
so that the user can see the whole content with proper width and height. Can
I use AutoFit() to adjust individual cell width and height? How can I do
that?

excelresultsheet.Cells(i+1,j+1).value=value[j];

As you can see, excelresultsheet is a worksheet type and value[j] are a long
string. I am using Java Script. Thanks a lot.

Weide



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to Use AutoFit()

Hi,

Can you tell me how I could apply the method on the "cells", which is the
member variable of the active work sheet. In javascript, I am able to use
cells[i][j] to access a specific cell. But i dont know how to use AutoFit on
individual cell? Which type of object can call AutoFit ? Thanks a lot.

Weide

"Gary Keramidas" wrote:

you can do rows and columns,

With Rows(1)
.HorizontalAlignment = xlCenter
.Font.Size = 8.5
.AutoFit
End With

and

With Columns("E:F")
.AutoFit
End With

--


Gary


"Weide Zhang" wrote in message
...
I need to put a long string into a cell but i want it shown in a proper way
so that the user can see the whole content with proper width and height. Can
I use AutoFit() to adjust individual cell width and height? How can I do
that?

excelresultsheet.Cells(i+1,j+1).value=value[j];

As you can see, excelresultsheet is a worksheet type and value[j] are a long
string. I am using Java Script. Thanks a lot.

Weide




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
Autofit Maxine Excel Discussion (Misc queries) 2 April 22nd 10 12:50 PM
Autofit (Columns.EntireColumn.AutoFit) does not work Michiel via OfficeKB.com Excel Discussion (Misc queries) 3 February 10th 09 05:29 PM
autofit Elena Excel Programming 3 May 22nd 06 05:48 PM
Autofit kevin Excel Programming 3 October 4th 04 09:26 PM
row autofit Robin Hammond Excel Programming 0 September 6th 03 02:33 AM


All times are GMT +1. The time now is 09:02 AM.

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

About Us

"It's about Microsoft Excel"