View Full Version : Sleeper: FlexGrid Control, list box
sskappel
10-11-2004, 05:21 PM
Anyone who knows how to add a FlexGrid Control to a normal excel spreadsheet? 
 
When I try to add it (through Excel - Visual Basic Control Toolbox - More Controls), I get this message: "Cannot insert object"
 
I think I need the FlexGrid. Otherwise, with list box, do I have any options for costumizing the list box, like settings different values for cell width of individual columns, or is it only the properties I find in the properties box?
 
 
ss :rolleyes:
Kieran
10-11-2004, 07:06 PM
The cell width can be set for a list box in the columns widts property
Separate the columns with ;  as in 29.1 pt;105 pt;96.7 pt for a 3 column list box.
 
What were your other properties you wanted to adjust?
sskappel
10-11-2004, 10:55 PM
Kieran, 
 
Thanks alot! :yes  
 
FlexGrid Control:
In more research for the use of "FlexGrid Control", I have the impression that it's not possible to use it with excel. Anyone to prove this wrong will be admired forever. :) 
 
list box:
In general I'm interested of doing all property settings within the visual basic code, and with variable references rather than hard numbers. And I would like as much control over single cells as possible. 
 
1.
How will the syntax be to change this in the vb-code? something like this?:
 
listbox1.ColumnWidths = 30; 40; 35;  
 
If I want to use variables here, like 
 
listbox1.ColumnWidths = var1; var2; var3;
 
What type would their type be (Long, double,.... )?
 
2.
Other properties:
Change background color individually (for a single row, a column or even for just one cell)?
Change font settings individually? 
Change other type of settings individually? 
 
3.
Will I get more or less costumizability by choosing a form list box, than an AxtiveX list box?
 
 
ss :rolleyes:
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.