' After the capture properties dialog has been 
 invoked,  
   Dim Index As Long
   Dim Count As Long
   If ltmmCapture.VideoInputs.Count > 
 0 Then
      If ltmmCapture.VideoInputs.Selection 
 = -1 Then
         If MsgBox("The video 
 input has been altered without changing other related inputs. Would you 
 like the other related inputs changed automatically?", vbYesNo) = 
 vbYes Then
            ' get 
 the closest selection and use it;
            ' this 
 will fix the problem of unmatched audio/video inputs.
            ltmmCapture.VideoInputs.Selection 
 = ltmmCapture.VideoInputs.NearestSelection
         End If
      End If
   End If