PDA

View Full Version : why the value are out the header...



sal21
02-01-2006, 05:56 AM
In effect when the userform initialize i would want to show into first line of listbox1 the 6 value from the sheet named CODICI range S1:X1 with a little tipical border...
Have maked this but the value are out respect the first line...
Help me!

With Me.ListBox1
.Clear
.ColumnCount = 6
.ColumnHeads = True
.AddItem
For I = 0 To 5
.List(0, 0 + I) = Sheets("CODICI").Cells(1, 19 + I).Value
Next I
End With

see the image attached...

sal21
02-01-2006, 05:58 AM
file attached

tpoynton
02-01-2006, 06:58 AM
Greetings,

I dont know about getting the border around your "header" row, but I have a question - if the values of the "header" row dont change dynamically, why not just make them a part of the userform? setting columnheads to false puts the labels you want in the first row, but they have no border.

The attachment has the behavior i think you are looking for, but lacks the look i think you are trying to achieve. I'd be interesting in learning from the experts here about a better solution!