Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Increase columns with interop

Hello,
I write an VB 2005 application that fills data into an excel spreadsheet
with office.interop.
Now I wanted to ask if it is possible to increase the column width to the
highest text value. Maybe you know that effect if you double click the line
between two excel columns and the width increase automatically.

Can anybody help to find the right function?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Increase columns with interop

Tim,
Look at the .Autofit property.
Columns("A:A").EntireColumn.AutoFit

It's easy to record a macro in Excel then translate the code. To VB.Net in
your case.

NickHK

"Tim Lypes" wrote in message
...
Hello,
I write an VB 2005 application that fills data into an excel spreadsheet
with office.interop.
Now I wanted to ask if it is possible to increase the column width to the
highest text value. Maybe you know that effect if you double click the

line
between two excel columns and the width increase automatically.

Can anybody help to find the right function?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Increase columns with interop

Nick,

great! Thank you


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
How do I increase the number of columns in excel above 256 Roy Excel Discussion (Misc queries) 1 March 29th 07 08:57 PM
increase the number of columns from 256 to 365 carlosgdlf Excel Discussion (Misc queries) 6 January 24th 06 11:27 PM
Could you tell me how I increase more columns in Excel? Dennys Excel Discussion (Misc queries) 7 August 16th 05 09:48 PM
increase # of columns gall Excel Discussion (Misc queries) 2 January 31st 05 04:03 PM
how do i increase the number of columns in excel urbpac Excel Programming 2 September 13th 04 03:08 AM


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

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"