Set Col width on SpreadsheetCtl 9.0???

Steff_DK

Registered User.
Local time
Today, 17:01
Joined
Feb 12, 2005
Messages
110
I have an MS Office Spread sheet 9.0 control on a form (since the flexgrid wasn't available :mad: )

How do I set the individual column width?

Have tried:
Code:
SpreadsheetCtl.Columns(5).Width = 3
SpreadsheetCtl.Columns("D:D").ColumnWidth = 3
SpreadsheetCtl.Columns("D:D").Width = 3

Doesn't work :confused:

This one I even recorded in a macro in Excel...
Code:
SpreadsheetCtl.Columns("D:D").ColumnWidth = 3

Thanks everyone :)
 
The plot thickens...

I get a msgbox with correct content (the width) when I do;
Code:
Msgbox SpreadsheetCtl.Columns(5).Width

If I delete the msgbox part I get wrong number of args or invalid property for that object ...

Still clueless :rolleyes:
 

Users who are viewing this thread

Back
Top Bottom