Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default LisBox Column Width

Hello All,

How to make a UserForm ListBox Column Widths to Auto Size?
Or
the ListBOx Column width be the same widths of the Columns in the
RowSourse ?


TIA

Abdul

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default LisBox Column Width

You would need to set the columnwidths property using code.


See the VBA help for msforms for details. You will probably want the
column width in points.

Activecell.entirecolumn.Width

will give you the column width in points as an example.

--
Regards,
Tom Ogilvy



"Abdul" wrote:

Hello All,

How to make a UserForm ListBox Column Widths to Auto Size?
Or
the ListBOx Column width be the same widths of the Columns in the
RowSourse ?


TIA

Abdul


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default LisBox Column Width

Thanks for your reply..

unfortunately I could not get the idea?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default LisBox Column Width

consult the MSforms VBA help on columnwidths. Learning to use the help
feature will pay you dividends in the future. It really isn't complex.

If you can't get it, what do you need that will help you get it.

--

"Abdul" wrote:

Thanks for your reply..

unfortunately I could not get the idea?


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default LisBox Column Width

Thanks,

I know it is easy to define the width of each column in a list box by
putting the value there.
What I am looking for is to get code for doing that based on the width
of the columns in the range or auto width for all columns sice the
rowsourse range column width are auto. It is very easy to make a range
EntireColumn.AutoFit. But is there a way like this for listbox column
width too?

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
Change Cell Width WITHOUT changing Column width dww701 Excel Discussion (Misc queries) 1 January 12th 09 10:52 PM
How to make cell width different than the column width it lies in John Excel Discussion (Misc queries) 2 September 11th 06 10:41 PM
Horizontal Scrollbar For Lisbox Justin Starnes[_2_] Excel Programming 5 October 20th 04 11:26 AM
LisBox List Abdul[_4_] Excel Programming 2 October 8th 03 05:08 PM


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

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"