If you are creating an application that users interact with then an easy way to allow the user to select a specific contract is to use the API's ContractPicker
' Display the contract picker to the user for them to select a market.
moContract = moHost.MarketData.ContractPicker(moContract)
' Check to see if a contract was selected.
If Not moContract Is Nothing Then
' User selected a contract.
If the user selected a Contract then it will be returned, if they didn't then the default Contract you specified will be returned. In this example above the previously selected Contract would be returned. You can also pass Nothing as the default in which case Nothing will be returned if they don't select anything.