View Single Post
 
Old 07-20-2017, 04:31 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could just add the items to an array directly:
Code:
Sub Demo()
Dim i As Long, myArray()
myArray = Array("Name1", "Name2", "Name3", "Name4", "Name5", "Name6", "Name7", "Name8")
For i = LBound(myArray) To UBound(myArray)
  MsgBox myArray(i)
Next
End Sub
If need be, such an array can even be constructed on the fly.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote