R
Rick S.
I have this list (for a listbox), condensed for this query..
'=====================
Private Sub UserForm_Initialize()
Me.ListBox1.AddItem ("1")
Me.ListBox1.AddItem ("2")
Me.ListBox1.AddItem ("3")
Me.ListBox1.AddItem ("4")
Me.ListBox1.AddItem ("5")
End Sub
'================
How do I read from that list and create code to mimick the following.
'==============
With ListBox1
If .Value = "1" Then
If .Value = "2" Then
If .Value = "3" Then
If .Value = "4" Then
If .Value = "5" Then
End If
End If
End If
End If
End If
'some code goes here
End With
'===============
I would like to prevent constant editing of the macro to accomidate new
entries.
--
Regards
Rick
XP Pro
Office 2007
'=====================
Private Sub UserForm_Initialize()
Me.ListBox1.AddItem ("1")
Me.ListBox1.AddItem ("2")
Me.ListBox1.AddItem ("3")
Me.ListBox1.AddItem ("4")
Me.ListBox1.AddItem ("5")
End Sub
'================
How do I read from that list and create code to mimick the following.
'==============
With ListBox1
If .Value = "1" Then
If .Value = "2" Then
If .Value = "3" Then
If .Value = "4" Then
If .Value = "5" Then
End If
End If
End If
End If
End If
'some code goes here
End With
'===============
I would like to prevent constant editing of the macro to accomidate new
entries.
--
Regards
Rick
XP Pro
Office 2007