·  VB .NET – Syntax – Conditional Statements – For Each...Next

 

- Info:

  - This tutorial shows how to use For Each...Next conditional statements.

 

- Procedure:

  - Create VB .NET Console Application Test.vb

 

    Test.vb

For Each MyObject In Selection.Fields

       

  If MyObject.Type = wdFieldListNum Then

    MsgBox "Object is found"

  End If

       

Next