All UserForm Controls have a Tag Property that can hold any String value
First, with all Controls I want to see in the EMail, I would add the name of the respective Label to its Tag.
For Each Ctl in Me.Controls
If Ctl.Tag <> "" Then
X = Me.Controls(Ctl.Tag).Caption
Z = Ctl.Value
Next
Collections contain Controls in some arbitrary order. I want my Email to be in a particular order.Create your own Collection and add the Controls in the desired order and use the first snippet above
Dim MyControls as Collection
With MyControls
.Add Me.Ctrl1
.add Me.Ctrl2
.add Me.Ctrl3
etc
End With
'
'
For Each Ctl In MyControls
X = Me.Controls(Ctl.Tag).Caption
Z = Ctl.Value
Next
Alternately,
Dim MyCtrls as Variant
MyCtrls = Array("Ctl1Name", "Ctl2Name", Ctl3Name", etc) 'In desired order
For i = Lbound(MyCtrls) to Ubound(MyCtrls)
X = Me.Controls(Me.Controls(MyCtrls(i)).Tag).Caption
Z = Me.Controls(MyCtrls(i)).Value
Next
Even Better, IMO. Tags not needed
Dim Captions As Variant
Captions = Array("Caption1", "Caption2", Etc) 'In desired order
Dim MyCtrls as Variant
MyCtrls = Array("Ctl1Name", "Ctl2Name", Ctl3Name", etc) 'In desired order
For i = Lbound(MyCtrls) to Ubound(MyCtrls)
X = MyCaptions(i)
Z = Me.Controls(MyCtrls(i)).Value
Next