Hey everyone, I have a userform in excel that's working just fine. What I would like to do is loop through cell values and then display them in a label control the same as I'm currently doing with the list and text boxes on the form. The difference is the label controls will not be used to update any values, just display them. But I'm at a loss as to how I can get this to work. Here is the code from the form that I found while searching this forum. This is a fantastic forum!

Any help would be great!


Private Sub UserForm_Initialize()

Dim ctlInfo As Control
Dim clsEvents As CControlEvents


'A module level collection so the classes don't
'lose scope
Set mcControls = New Collection

'Fill the combobox with a list of Shift time selections
'on a separate worksheet

Me.ShiftAssignments.List = Employees.Range("Assignments").Value
Me.SunD.List = Employees.Range("TueShift").Value
Me.MonD.List = Employees.Range("TueShift").Value
Me.TueD.List = Employees.Range("TueShift").Value
Me.WedD.List = Employees.Range("TueShift").Value
Me.ThuD.List = Employees.Range("TueShift").Value
Me.FriD.List = Employees.Range("TueShift").Value
Me.SatD.List = Employees.Range("TueShift").Value

'Loop through the controls on the form
For Each ctlInfo In Me.Controls

'Controls with a numeric tag are data entry controls
'and that's what we want
If IsNumeric(ctlInfo.Tag) Then
'Create a new class
Set clsEvents = New CControlEvents
'Determine the type of control, set the public
'withevents class variable to the control, and
'add the class to the collection so it won't go
'out of scope while the form is shown.
Select Case TypeName(ctlInfo)
Case "TextBox"
Set clsEvents.gTextBox = ctlInfo
mcControls.Add clsEvents, CStr(ctlInfo.Tag)

Case "ComboBox"
Set clsEvents.gCombo = ctlInfo
mcControls.Add clsEvents, CStr(ctlInfo.Tag)
End Select
End If
Next ctlInfo


'Self-documenting helper sub names - you gotta love that
DefineScroll

'Start at the first record
Me.scbContact.Value = Me.scbContact.Min

End Sub