End Sub
[/vba]
Now that is just for 4 rows of Labels within the Frame.
But I want to have about 25 rows.
How can I set this up so when BtnAdd is clicked to add row 5, it will make the Frame scoll down so now you can only see row2 - row5.
Then if BtnAdd is clicked again you will see row3 - row6.
Ok i added it and works good, but limit's me to what I can do with it.
For Example with the Labels I created an X button next to each label row and if clicked it would remove item from the label and any labels with data following the label removed label would move up.
Example.
Line 1 X................3.75 oz................35cents...........$1.31
Line 2 X................7.50 oz................35cents...........$2.63
Line 3 X................5.75 oz................35cents...........$2.01
If X in Line 2 is clicked you would get
Line 1 X................3.75 oz................35cents...........$1.31
Line 2 X................5.75 oz................35cents...........$2.01
You could put code like this in the ListBox1_Click event
[VBA]With ListBox1
If .ListIndex <> -1 Then
.RemoveItem .ListIndex
End If
End With[/VBA]
It seems that a lot of these questions could be answered by browsing in the ObjectBrowser which give all the properties and methods that one has available to control userform Controls.
I was playing around with the Lable/Frame/ScrollBar idea and came up with this.
The ScrollBar control works smother on my Mac than the Frame's scroll bar.