I'm not sure if you wanted the user to select bodies, or if you have another way to determine which parts get selected. The below code will let user pick bodies and store them into an Object collection for later use.
Dim selectThis As HighlightSet = ThisApplication.ActiveDocument.CreateHighlightSet
Dim DocCollection As ObjectCollection = ThisApplication.TransientObjects.CreateObjectCollection
Dim BodyCount As Integer = InputBox("How many Solid bodies will you need?", "Body Count", "3")
While DocCollection.Count < BodyCount
Dim PickThis As SurfaceBody = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kPartBodyFilter, "Select Body")
If IsNothing(PickThis) Then Exit Sub ' If nothing gets selected then we're done
'Perform any checks to limit selection, if any
DocCollection.Add(PickThis)
End While
selectThis.AddMultipleItems(DocCollection)
MessageBox.Show("","Bodies Picked:")
If you were looking for something else, let me know.