ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fix Column width in spreadsheet control?! (https://www.excelbanter.com/excel-programming/437337-fix-column-width-spreadsheet-control.html)

Webtechie

Fix Column width in spreadsheet control?!
 
I finally got data showing on my userform with a spreadsheet control!

Now the only thing I need to do is to figure out how to fix the columns
widths in the control to autofit.

I'd appreciate any help.


Thanks,

Toiny

JLGWhiz[_2_]

Fix Column width in spreadsheet control?!
 
I believe the default for ColumnWidths in the ListBox and the ComboBox is
for autofit, which will set the column width to the longest string in the
column, up to 72 points. If you want more spacing between columns then you
will have to set the width of the columns a little wider than the autofit.
You can set the ColumnWidths in the properties window while in the VB
editor, or using code per VBA help file under "ColumnWidths". Note the "s",
which differentiates between the worksheet ColumnWidth.


"Webtechie" wrote in message
...
I finally got data showing on my userform with a spreadsheet control!

Now the only thing I need to do is to figure out how to fix the columns
widths in the control to autofit.

I'd appreciate any help.


Thanks,

Toiny




jenny[_2_]

Fix Column width in spreadsheet control?!
 
I prefer the combination of backups and recovery services, have you ever heard about the service of <a href="http://www.recoverytoolbox.com/microsoft_sql_server_database_recovery_download.ht ml"sql server 2005 in recovery</a, provided by Recovery Toolbox for SQL Server? Indeed, it is not possible to write a separate article for all database-related issues

---
frmsrcurl: http://msgroups.net/microsoft.public...dsheet-control


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com